1 |
Alan McKinnon schrieb: |
2 |
> On Tue, 2006-07-25 at 16:18 +0200, Etaoin Shrdlu wrote: |
3 |
>> > test and [ are not links to each other as they have different syntax |
4 |
>> > (the closing ]), so they cannot be the same command. If they were |
5 |
>> > linked, one of them would fail on execution with invalid syntax |
6 |
>> errors |
7 |
>> |
8 |
>> This is not 100% true. As Neil Bothwick said, *the same program* can |
9 |
>> behave differently based on the name it was invoked with, so [ could |
10 |
>> very well have been implemented as a link to test (or viceversa), but |
11 |
>> this is not the case, as you can see with a |
12 |
>> ls -l /usr/bin/test /usr/bin/[ |
13 |
> |
14 |
> Um, no. |
15 |
|
16 |
Uhm, *YES*. |
17 |
|
18 |
> Read my post again. |
19 |
|
20 |
You better do so. |
21 |
|
22 |
> The command 'test' and the command '[' have |
23 |
> *different* syntax |
24 |
|
25 |
Yes. |
26 |
|
27 |
> so cannot possible be links to each other |
28 |
|
29 |
Why not? |
30 |
|
31 |
> The command does behave differently depending on the name |
32 |
> it is called with, but this does not change the syntax used on the |
33 |
> command line that invokes it. |
34 |
|
35 |
What are you talking about? |
36 |
|
37 |
Of course the program could have a different syntax. |
38 |
|
39 |
For example, compare the syntax that zipinfo and unzip have. |
40 |
|
41 |
Alexander Skwar |
42 |
-- |
43 |
Delta: The kids will love our inflatable slides. -- David Letterman |
44 |
-- |
45 |
gentoo-user@g.o mailing list |