Kommentare zu: /usr/bin/test not /usr/bin/[ anymore? http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/ Thu, 22 Oct 2015 22:23:33 +0000 hourly 1 https://wordpress.org/?v=4.4.1 Von: ccm http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/comment-page-1/#comment-74 Tue, 08 Jan 2008 17:45:32 +0000 http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/#comment-74 @Malcolm:

Think the comment in Savannah says it: Depending on the file name is not compatible to the gnu coreutils guidelines – that is why those two programs have been split.

]]>
Von: Malcolm Parsons http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/comment-page-1/#comment-73 Tue, 08 Jan 2008 15:48:56 +0000 http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/#comment-73 It seems this was changed in 2003:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=138fd919b8039c219fd5bca4f99bcfe65d3e69e0

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=05731b47170a04cb54be605b037ffd712fdd8a3f

]]>
Von: Stefan Potyra http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/comment-page-1/#comment-72 Tue, 08 Jan 2008 15:22:21 +0000 http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/#comment-72 You’ll find the answer in coreutils test.c, which gets compiled twice.

The reason why these mustn’t be identical (apart from different behaviour for –help and –version) should be clear from the following example:

if test -z $MYVAR; then
..
fi

vs.

if [ -z $MYVAR; then
..
fi

The first is valid, the second is not and *must* fail.

HTH,
Stefan.

]]>
Von: Daniel Holbach http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/comment-page-1/#comment-71 Tue, 08 Jan 2008 14:41:12 +0000 http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/#comment-71 coreutils: /usr/bin/[

]]>
Von: Olivier http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/comment-page-1/#comment-66 Tue, 08 Jan 2008 14:07:29 +0000 http://www.screenage.de/blog/2008/01/08/usrbintest-not-usrbin-anymore/#comment-66 Hi !
On my fedora core 8 [ and test are different too :

ls /usr/bin/test /usr/bin/\[ -l
-rwxr-xr-x 1 root root 31404 déc 5 14:25 /usr/bin/[
-rwxr-xr-x 1 root root 29032 déc 5 14:24 /usr/bin/test

]]>