Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: