I was trying to write a bash script that uses an
if [$CHOICE -eq 1];
if [ $CHOICE -eq 1 ];
Once you grasp that
[ is a command, a whole lot becomes clearer!
[ is another way to spell "
However while they do exactly the same,
test turns out to have a more detailed help page. Check
...for more information.
Furthermore note that I'm using, by intention,
help test and not
man test. That's because
[ are shell builtin commands nowadays. Their feature set might differ from
/bin/[ from coreutils which are the commands described in the