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

Watch on YouTube

Show annotations

Download is disabled.

73,304

3,527

187

Genre: Science & Technology

License: Creative Commons Attribution license (reuse allowed)

Family friendly? Yes

Wilson score: 0.9421

Rating: 4.7986 / 5

Engagement: 5.07%

Luke Smith

Subscribe | 83.4K

Shared March 19, 2020

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 elegant looking and running code.

WEBSITE: https://lukesmith.xyz 🌐❓🔎
DONATE NOW: https://lukesmith.xyz/donate 💰😎👌💯