Re: '/usr/bin/[' (was RE: FC12: Hidden files in /usr/bin/*)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-01-25 at 16:44 +0100, Andreas Schwab wrote:
> Garrett Holmstrom <gholms@xxxxxxxxxxxxxxxxx> writes:
> 
> > On Mon, Jan 25, 2010 at 6:09 AM, Bryn M. Reeves <bmr@xxxxxxxxxx> wrote:
> >> It's cute isn't it? I had the biggest grin the day I realised that '['
> >> was just another command..
> >
> > That's the reason [[ can use special characters like < and > without
> > escaping, while [ can't:  [[ is a builtin, but [ isn't.
> 
> Well, [ is a builtin too, but [[ is a keyword recognised by the parser,
> thus it can use special parsing rules.
> 

<nitpick> [ may be a built in but then again (as its presence
in /usr/bin implies) it may not be :). In traditional shells it was a
proper command but is often a builtin these days.

[[..]] are one of the syntactic elements the bash provides for building
compound commands.

Regards,
Bryn.



-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux