ash test suite

Paul Smith psmith at netezza.com
Sun Feb 25 02:31:05 UTC 2007


On Sun, 2007-02-25 at 01:54 +0100, Denis Vlasenko wrote:

> bash-3.2# [ "yes" || "" ] && echo hello
> bash: [: missing `]'
> bash: : command not found
> 
> I suspect a bug in the example.

Correct; this is not valid shell syntax.  Perhaps they mean:

  [ "yes" -o "" ] && echo hello

You can't use a shell "or" operator (||) inside a test invocation; the
|| will end the command.



More information about the busybox mailing list