Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] strange [ file
Date: Tue, 25 Jul 2006 09:22:23
Message-Id: 7573e9640607250214m1b5f3c26oebd45dd5edce4d2f@mail.gmail.com
In Reply to: [gentoo-user] strange [ file by Arnau Bria
1 On 7/25/06, Arnau Bria <arnau@×××××××××.net> wrote:
2 > Hi,
3 >
4 > I've seen a file named "[" in my /usr/bin ...
5
6 Perfectly normal. It is a program that implements bash style tests
7 for script environments that don't normally do them. For example:
8
9 if [ -f /etc/passwd ] ; then
10 echo "/etc/passwd exists and is a regular file"
11 fi
12
13 Notice the "[" after the "if"....
14
15 "man test" will give you the user manual for it.
16
17 More generally, merge gentoolkit, and you can use equery to find out
18 where things come from. Ex:
19
20 ~ > equery belongs "/usr/bin/["
21 [ Searching for file(s) /usr/bin/[ in *... ]
22 sys-apps/coreutils-5.97 (/usr/bin/[)
23 ~ > equery check coreutils
24 [ Checking sys-apps/coreutils-5.97 ]
25 * 318 out of 318 files good
26
27 -Richard
28 --
29 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] strange [ file Arnau Bria <arnau@×××××××××.net>
Re: [gentoo-user] strange [ file Alexander Skwar <listen@×××××××××××××××.name>