3 ms·
I usually do something like that: [ -z "$1" ] && echo "Invalid first parameter!" >&2 && exit 127 as a precondition. I must admit that it's longer to write
by williamdclt 9y ago
I usually do something like that:
[ -z "$1" ] && echo "Invalid first parameter!" >&2 && exit 127
as a precondition. I must admit that it's longer to write, but I can write a bunch of preconditions for my function then write the logic with an appeased mind