Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11308

Re: Worth mentioning in documentation

From Juanma <juan-manuel.menendez@tecsidel.es>
Newsgroups gnu.bash.bug
Subject Re: Worth mentioning in documentation
Date 2015-08-10 10:18 +0200
Message-ID <mailman.8064.1439194743.904.bug-bash@gnu.org> (permalink)
References <3156909.AJj7susDjE@debxuan> <2473887.nPWqTkAiyd@debxuan> <20150807122454.GU4309@eeg.ccf.org>

Show all headers | View raw


El Fri 7 of Aug, Greg Wooledge profirió estas palabras:
> > Those brackets I cited above: ( expression )
> In the US we call those "parentheses", and we reserve the word "brackets"
> (or "square brackets") for [ ].  I realize that the UK uses different
> terminology.  Hence, the word is ambiguous and you should always type
> the actual characters you mean.

Lesson learned.
I didn't mean to enforce UK wording; I just forgot there was a more "natural" word for me (as Eduardo noted). 

[...]
> [ is an ordinary command (a "shell builtin")

Here is another point I find confusing: I thought a "shell builtin" didn't have a separate binary executable file, like 'cd' (which cd => fail), but some of them do have such form (which [ => /usr/bin/[ ; which pwd => /bin/pwd). I also fail to see how 'test' modifies the state of the shell itself (like 'cd' does), or why it is "impossible or inconvenient to obtain [its functionality] with separate utilities".

But that's another story.

> You were reading the section on [[ and assuming that it applies to [.
> That's a huge mistake.
[...]
> Do not use -a or -o.  They might as well not EXIST.  Just forget them.
> You can't use them in [ and you can't use them in test and you can't
> use them in [[.
> 
> Use one of the syntaxes I've shown here.

Huge thanks. It was a good explanation.
-- 
Juanma Menéndez

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Worth mentioning in documentation Juanma <juan-manuel.menendez@tecsidel.es> - 2015-08-10 10:18 +0200

csiph-web