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 11:08:44
Message-Id: 44C5F9EB.9070708@mid.message-center.info
In Reply to: Re: [gentoo-user] strange [ file by Richard Fish
1 Richard Fish wrote:
2 > On 7/25/06, Arnau Bria <arnau@×××××××××.net> wrote:
3 >> Hi,
4 >>
5 >> I've seen a file named "[" in my /usr/bin ...
6 >
7 > Perfectly normal. It is a program that implements bash style tests
8
9 Not *bash* style tests. bash doesn't have much to do with this.
10
11 > for script environments that don't normally do them. For example:
12 >
13 > if [ -f /etc/passwd ] ; then
14 > echo "/etc/passwd exists and is a regular file"
15 > fi
16 >
17 > Notice the "[" after the "if"....
18
19 However, [ is normally a shell builtin and thus /usr/bin/[ isn't
20 executed.
21
22 Alexander Skwar
23 --
24 Give a man a fish, and you feed him for a day.
25 Teach a man to fish, and he'll invite himself over for dinner.
26 - Calvin Keegan
27 --
28 gentoo-user@g.o mailing list