Re: Option "-n" not working reliably and poorly documented
From:
Paul Jarc
Subject:
Re: Option "-n" not working reliably and poorly documented
Date:
Wed, 11 Feb 2009 16:02:13 -0500
User-agent:
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Jon Seymour <jon.seymour@gmail.com> wrote:
> Not sure this is correct. The ] is parsed by the shell
It's parsed by the [ command. That happens to be a builtin command,
so yes, it is done by the shell, but it is not part of the grammar of
the shell language.
> This is why the -n option reports an error, since -n suppresses
> command execution.
-n *doesn't* report an error, because it only checks that the script
satisfies the shell grammar. It doesn't verify that the arguments of
builtin commands are meaningful.
paul