[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix coreutils-5.0.91 rejecting "[ toto -eq tata ]" like form

From: Paul Eggert
Subject: Re: [PATCH] fix coreutils-5.0.91 rejecting "[ toto -eq tata ]" like forms
Date: 07 Jan 2004 20:59:12 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Thierry Vignaud <address@hidden> writes:

> # unpatched coreutils-5.0.91:
> $ perl -e 'system("/usr/bin/[", "1", "=", "1", "]")'
> /usr/bin/[: too many arguments

I don't get that behavior with unpatched coreutils 5.1.0;
please see the transcript below.

One theory is that your packaging somehow created a hard or symbolic
link from /usr/bin/[ to /usr/bin/test.  Such a link used to be valid
with coreutils, but it is valid no longer, since "[" and "test" now
separate executables with different behaviors.  This is to conform to
the GNU coding standards, which say that an executable's behavior
should not depend on its name.

To test this theory, can you please send the output of the command
(cd /usr/bin && ls -li '[' test)
to bug-coreutils?  Thanks.

Here's the transcript that I mentioned:

$ perl -e 'system("/home/eggert/opt/Linux-2.4.18-bf2.4-unknown/merged/bin/[", 
"1", "=", "1", "]")'
$ perl -e 
'system("/home/eggert/opt/Linux-2.4.18-bf2.4-unknown/merged/bin/test", "1", 
"=", "1", "]")'
/home/eggert/opt/Linux-2.4.18-bf2.4-unknown/merged/bin/test: too many arguments
$ (cd /home/eggert/opt/Linux-2.4.18-bf2.4-unknown/merged/bin && ls -li '[' test)
2507466 -r-xr-xr-x  2 eggert eggert 98583 2003-12-23 12:25 [
2507539 -r-xr-xr-x  2 eggert eggert 86928 2003-12-23 12:25 test

reply via email to

[Prev in Thread] Current Thread [Next in Thread]