4 ms·
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 a
by akdor1154 6y ago
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.