DEV Community

Discussion on: The Only Bash Scripting Cheat Sheet That You Will Ever Need

superfola profile image
Alexandre Plateau • Edited on

Shebang option 2 should be preferred for systems were bash isn't in /bin, that gives a much better portability!

I would also add that there is a huge difference between , and [[ ]] which is a syntactic element of bash, better than the [ command, which you would usually use most of the time.