zet

Just Write It in Bash

While I still agree with everything I have ever said about learning POSIX shell first, from a practical perspective I’m going back to writing everything in Bash. Writing stuff in bash is worth it just for the double-brackets alone, not to mention the non-shadowing options with < to feed while loops. Then there are arrays, maps, indirect variable referencing and more. I could argue that using these things makes bash harder to read. I don’t give a shit. These constructs are so powerful, and so available that not using them actually makes people wonder why you aren’t using them — especially in the secops space. Bottom line: bash makes you one powerful shell scripting mother fucker from your single commands to 500 line bash script monstrosities. I’m done with bash guilt. Bash is the next best thing to perl, but its the default shell on most everything and when it’s not there, POSIX shell is just a subset of bash and readily available, cognitively.