News for hackers. Stuff that matters.
Re:Shell programming with bash: by example, by counter-example by GlitchMr on Monday January 13, 2014 @03:10PM (#7052961)
This is why I prefer http://fishshell.com/ to bash. Bash just has too much noise in my opinion (like then keyword).
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.