Bash shell scripting gotchas

I hate scripting in bash (or other shells) since the syntax is so terrible and I can never remember how to start coding in it. Today I learnt of a simple trick to avoid the pitfalls of not having spaces before and after the [ ] used in if statements.

More on this is at SO: bash brackets

Why bash why? Why don’t authors of popular shells just adopt a common syntax like say, C for everything? Why must we learn a million different syntax-es?

On those lines, don’t get me started on perl syntax either … 😦

Advertisements