On Wed, May 09, 2007 at 09:00:58AM -0700, Bob McGowan wrote: > bdeferme wrote: > >Tom Grove <[EMAIL PROTECTED]> wrote: > > > >>Hello all...I am new to this Debian thing :-) I used it in the Woody > >>days but moved over to the FreeBSD world for the last few years. I > >>recently installed Testing (Lenny) and see the left bracket in my > >>/usr/bin directory and do not know what it is. When I ls -al it I get: > >> > >>-rwxr-xr-x 1 root root 24752 2007-01-30 13:51 /usr/bin/[ > I'm not sure why 'test' and '[' exist as separate files, today. In the > 'old' days, '[' and 'test' were simply hard links to the same file. > This allowed the code to look at the name used to run it and set some > specific default behaviors. The most important of these was that the > name '[' required a final argument of ']'. This was done to make shell > scripting cleaner and easier to read. > 1. ls /usr/bin/[ and ls /usr/bin/\[ are identical (the escape is not > needed). This is because the shell only treats '[' specially when it is > stand alone. And ls itself doesn't process special characters. > > dpkg -S '/usr/bin\[' > > is much easier to read (and type correctly), than > > dpkg -S /usr/bin/\\\[ >
No wonder I can never figure out what a shell script is trying to do, either way it looks like a cat on a keyboard. Give me python and fortran77 any day. Doug. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]