3 ms·
http://mywiki.wooledge.org/BashFAQ/031 http://mywiki.wooledge.org/BashFAQ/031 is a great reference. If your guide is for bash and not sh, then I would say don'
by unhammer 13y ago
http://mywiki.wooledge.org/BashFAQ/031 http://mywiki.wooledge.org/BashFAQ/031 is a great reference.
If your guide is for bash and not sh, then I would say don't teach them [, just do [[. It's safer, since it won't glob or split words, you don't need quoting, and you don't need to escape operators like < and >. Maybe it's can be seen as more difficult since it's a sublanguage (doesn't use the regular syntax rules), but so are (( and $(( which you've discussed at length, and which are typically less useful than [[ in bash.