Gentoo Archives: gentoo-user

From: "Jesús J. Guerrero Botella" <jesus.guerrero.botella@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] "/usr/bin/[" and coreutils
Date: Thu, 13 Oct 2011 13:40:37
Message-Id: CAMix8LENwgyh8RE0k73q0CqtggECWO6073Ge_fHQ_o4DEjR6uA@mail.gmail.com
In Reply to: Re: [gentoo-user] "/usr/bin/[" and coreutils by Jonas de Buhr
1 Yes, it's a different binary, and it's perfectly usual to find it in a
2 Linux system.
3
4 But note that, at least in bash, you rarely will be using /usr/bin/[
5 unless you reference it using the full path (either in a relative or
6 absolute way). This is because bash has a builtin that takes over that
7 binary file. You can check that (or any other command) by using the
8 "type" instruction (again, this is for bash).
9
10 # LC_ALL=C type [
11 [ is a shell builtin
12
13 The same goes for 'test'.
14
15 Those binaries are probably there just in case that some init or
16 system script written for a standard bourne shell (like the busybox
17 one) needs it. But don't take my word for it. I am not sure right now.
18
19 --
20 Jesús Guerrero Botella

Replies

Subject Author
Re: [gentoo-user] "/usr/bin/[" and coreutils Alan McKinnon <alan.mckinnon@×××××.com>