News for hackers. Stuff that matters.
Re:Shell programming with bash: by example, by counter-example by barrkel on Tuesday January 14, 2014 @08:19AM (#7056806)
For simple ifs that don't require elses, I just use && or || as necessary:

    test -e "$file" || {
        echo "file not found: '$file'" >/dev/stderr
        exit 1
    }
etc.

There are no comments on this comment yet.