On 10/04/2014 05:44 PM, David Haller wrote:
On Fri, 03 Oct 2014, Bernhard Voelker wrote:
That's part of coreutils and (almost) the same as /usr/bin/test.
Actually, it used to be a symlink or hardlink to /bin/test. I just checked:
$ pin -v 9.1 '/usr/bin/test$' |tail -1; pin -v 9.1 '/usr/bin/\[' |tail -1; ./CD1/suse/i586/coreutils-5.2.1-23.i586.rpm: -rwxr-xr-x root\ root 27577 Apr 6 03:58 /usr/bin/test ./CD1/suse/i586/coreutils-5.2.1-23.i586.rpm: -rwxr-xr-x root\ root 29359 Apr 6 03:58 /usr/bin/[
$ pin -v 8.2 '/usr/bin/test$' |tail -1; pin -v 8.2 '/usr/bin/\[' |tail -1; ./CD1/suse/i586/coreutils-4.5.8-11.i586.rpm: -rwxr-xr-x root\ root 23616 Mar 14 03:00 /usr/bin/test ./CD1/suse/i586/coreutils-4.5.8-11.i586.rpm: lrwxrwxrwx root\ root 4 Mar 14 03:00 /usr/bin/[ -> test
Indeed. Between those 2 (ancient) versions, commit [1] made 'test' and '[' behave differently to fulfill the GNU coding standard versus the POSIX standard (i.e. accepting --help and --version or not, not based on argv[0] any longer): [1] http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=05731b4717 Compare the behavior with --help for both programs: $ diff -u \ <( '/usr/bin/test' --version ) \ <( '/usr/bin/[' --version ) --- /dev/fd/63 2014-10-05 11:29:37.629953087 +0200 +++ /dev/fd/62 2014-10-05 11:29:37.646955619 +0200 @@ -0,0 +1,7 @@ +[ (GNU coreutils) 8.21 +Copyright (C) 2013 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by Kevin Braunsdorf and Matthew Bradburn. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org