&gt; Shell scripting isn&#x27;t easy. It took a year to understand<p>That might make it seem like too hard for some people. It&#x27;s really not that bad. These particular mistakes were beginner&#x27;s mistakes.<p>But it <i>is</i> tricky! I usually try to tell people to avoid writing shell scripts until you&#x27;ve <i>at</i> <i>least</i> read the &quot;Bash Beginners Guide&quot; or something similar. It&#x27;s comparably short (remember, you&#x27;re learning a new <i>language</i> and an arcane one at that) but at least lets you avoid the easy traps. Also, indent and comment. Surprisingly many people seem to think hygiene is somehow less important outside their main language.<p>On a side note, what&#x27;s up with not reading manuals these days? When I am tasked with something new, no matter  how trivial, my first step is to at least skim the manual get a feel for what the problem domain looks like and how you are supposed to wield the tool I am about to use. Turns out nobody does that anymore. Zero, out of over a dozen people in my closest (java, web) team have read the documentation for the product we build on. I find it unprofessional, but I realize I&#x27;m the strange one and it&#x27;s probably just me getting older.