Dale <rdalek1...@gmail.com> writes:
Should I change mine from a single [ ] to a double [[ ]]? For
future
compatibility if nothing else?
It depends what you mean by "compatibility". [[...]] is not POSIX,
so is not supported by (for example) the dash shell. But if you're
only ever going to be using this script with shells that support
the '[[' construct, there's no reason to not use it.
('Compatibility' when it comes to shell scripting is a very messy
topic. Over time i've gradually been documenting various
differences between shells on the Gentoo wiki at
https://wiki.gentoo.org/wiki/Shell/Scripting ).
Alexis.