Never say "If" writing a Bash script! (Exit codes & logical operators)

First published at 13:07 UTC on March 19th, 2020.

Luke Smith

Luke Smith


A good rule of thumb is to never use "if" statements when writing shell or bash scripts. 90% of the time, you can get what you want more elegantly just with logical operators like && and ||. It makes the difference between ugly and…

CategoryScience & Technology
SensitivityNormal - Content that is suitable for ages 16 and over