On Tue, 25 Jul 2006 13:02:48 +0200
Alexander Skwar <[EMAIL PROTECTED]> wrote:
> Dirk Heinrichs wrote:
> > Am Dienstag, 25. Juli 2006 11:00 schrieb ext Arnau Bria:
> >
> >> I've seen a file named "[" in my /usr/bin ...
> >> [...]
> >>
> >> does any one know what could it be?¿
> >
> > It's the [ from "if [ condition ]; then ...", a shortcut for /usr/bin/test.
>
> Nope, not correct.
>
> [09:39:58 [EMAIL PROTECTED]:~] $ type [
> [ is a shell builtin
> [13:01:25 [EMAIL PROTECTED]:~] $ type test
> test is a shell builtin
>
> And actually /usr/bin/[ and /usr/bin/test aren't even the same:
>
> [13:01:56 [EMAIL PROTECTED]:~] $ ls -la /usr/bin/{[,test}
> -rwxr-xr-x 1 root root 24852 27. Jun 09:34 /usr/bin/[
> -rwxr-xr-x 1 root root 22784 27. Jun 09:34 /usr/bin/test
>
> I wonder where the differences are. I would've expected that test and [
> were hardlinks.
# /usr/bin/[
/usr/bin/[: missing ']'
# /usr/bin/test
<no output>
#
You see? They cant be the same, because the closing "]" is needed by /usr/bin[
and not by /usr/bin/test
Hagen
--
[email protected] mailing list