1 |
William Kenworthy <billk@×××××××××.au> [11-10-12 07:40]: |
2 |
> I have been checking my system for some deep seated problems and in the |
3 |
> process, ran across the fact that "equery files sys-apps/coreutils-8.7" |
4 |
> shows a file included called "/usr/bin/[" - thats right, left square |
5 |
> bracket! |
6 |
> |
7 |
> Is that a bug or if real, what would you use it for? It doesnt seem to |
8 |
> be on the file system ... |
9 |
> |
10 |
> moriah ~ # /usr/bin/[ |
11 |
> /usr/bin/[: missing `]' |
12 |
> moriah ~ # |
13 |
> |
14 |
> doesnt show much! |
15 |
> |
16 |
> BillK |
17 |
> |
18 |
> |
19 |
|
20 |
Hi Wiiliam, |
21 |
|
22 |
this is a convenient 'abbreviation' or 'alias' for cobnstructs such this one |
23 |
|
24 |
if [ foo ] |
25 |
then |
26 |
bar |
27 |
fi |
28 |
|
29 |
in shell scripting. |
30 |
|
31 |
Most shells have implemented this as a builtin (and 'test' also) |
32 |
though. |
33 |
|
34 |
HTH! |
35 |
|
36 |
Best regards, |
37 |
mcc |