1 |
On Tue, 25 Jul 2006 13:02:48 +0200 |
2 |
Alexander Skwar <listen@×××××××××××××××.name> wrote: |
3 |
|
4 |
> Dirk Heinrichs wrote: |
5 |
> > Am Dienstag, 25. Juli 2006 11:00 schrieb ext Arnau Bria: |
6 |
> > |
7 |
> >> I've seen a file named "[" in my /usr/bin ... |
8 |
> >> [...] |
9 |
> >> |
10 |
> >> does any one know what could it be?¿ |
11 |
> > |
12 |
> > It's the [ from "if [ condition ]; then ...", a shortcut for /usr/bin/test. |
13 |
> |
14 |
> Nope, not correct. |
15 |
> |
16 |
> [09:39:58 vz6tml@dewup-ww02:~] $ type [ |
17 |
> [ is a shell builtin |
18 |
> [13:01:25 vz6tml@dewup-ww02:~] $ type test |
19 |
> test is a shell builtin |
20 |
> |
21 |
> And actually /usr/bin/[ and /usr/bin/test aren't even the same: |
22 |
> |
23 |
> [13:01:56 vz6tml@dewup-ww02:~] $ ls -la /usr/bin/{[,test} |
24 |
> -rwxr-xr-x 1 root root 24852 27. Jun 09:34 /usr/bin/[ |
25 |
> -rwxr-xr-x 1 root root 22784 27. Jun 09:34 /usr/bin/test |
26 |
> |
27 |
> I wonder where the differences are. I would've expected that test and [ |
28 |
> were hardlinks. |
29 |
|
30 |
# /usr/bin/[ |
31 |
/usr/bin/[: missing ']' |
32 |
# /usr/bin/test |
33 |
<no output> |
34 |
# |
35 |
|
36 |
You see? They cant be the same, because the closing "]" is needed by /usr/bin[ and not by /usr/bin/test |
37 |
|
38 |
Hagen |
39 |
|
40 |
-- |
41 |
gentoo-user@g.o mailing list |