4 ms·
> the reason is complex, I'll leave it as a puzzle for the reader [ -n ] is the same as test -n In this case -n has no argument, so it cannot be par
by ycmbntrthrwaway 11y ago
> the reason is complex, I'll leave it as a puzzle for the reader
[ -n ]
is the same as
test -n
In this case -n has no argument, so it cannot be parsed as "-n STRING", instead it is parsed as "STRING", where STRING is "-n", with the behaviour "True if string is not empty.".