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

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

HomeOther ContentNever say “If” writing a Bash script! (Exit codes & logical operators)
ChannelPublish DateThumbnail & View CountActions
Channel AvatarPublish Date not found Thumbnail
0 Views
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

Please take the opportunity to connect and share this video with your friends and family if you find it useful.