News for hackers. Stuff that matters.
Re:Elegant Bash Conditionals by akdor1154 on Tuesday March 02, 2021 @10:21PM (#26324340)
Both of the suggestions lead to overly brief and harder to read one liners, imo.

Explicit if [].. is more readable.

Chaining commands with && is better just accomplished by running `set -e` which you should be doing at the start of your script anyway.

And of course both of these are getting pretty close to the "if you have to Google what this bash syntax does, just write your script in Python" rule.

There are no comments on this comment yet.