Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
williamdclt
on Jan 7, 2018
|
parent
|
context
|
favorite
| on:
Things I Wish I'd Known About Bash
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
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: