Gentoo Archives: gentoo-user

From: Alexander Skwar <listen@×××××××××××××××.name>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] strange [ file
Date: Tue, 25 Jul 2006 14:11:21
Message-Id: 44C623C7.90806@mid.message-center.info
In Reply to: Re: [gentoo-user] strange [ file by Neil Bothwick
1 Neil Bothwick wrote:
2 > On Tue, 25 Jul 2006 09:26:52 -0300, Mauro Faccenda wrote:
3 >
4 >> > > You see? They cant be the same, because the closing "]" is needed
5 >> > > by /usr/bin[ and not by /usr/bin/test
6 >> >
7 >> > It's quite common for a program to change its behaviour according to
8 >> > the name used to run it. For example, zcat and gunzip are links to
9 >> > gzip, yet the three programs behave differently.
10 >>
11 >> but this isn't the case:
12 >
13 > I was disagreeing with the "cant be the same" comment. I know they are
14 > different files, but the slightly different behaviour is insufficient
15 > reason for that. Alexander asked why one was not a link to the other, I'd
16 > like to know too, but this isn't the reason.
17
18 Yes, you're right, [ and test *COULD* be the same command, just like
19 gzip and gunzip are the same command, but the coreutils makers seem
20 to have decided otherwise. It's not that important to me, if it were,
21 I'd ask the coreutils makers and not some 3rd party. :)
22
23 Anyway, on other systems (HP-UX, Solaris 8), there isn't even a
24 /usr/bin/[ - there's just /usr/bin/test.
25
26 Alexander Skwar
27 --
28 May those that love us love us; and those that don't love us, may
29 God turn their hearts; and if he doesn't turn their hearts, may
30 he turn their ankles so we'll know them by their limping.
31 --
32 gentoo-user@g.o mailing list