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


Groups > gnu.bash.bug > #11295

Worth mentioning in documentation

Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!usenet.stanford.edu!not-for-mail
From Juanma <juan-manuel.menendez@tecsidel.es>
Newsgroups gnu.bash.bug
Subject Worth mentioning in documentation
Date Thu, 6 Aug 2015 16:13:30 +0200
Lines 22
Approved bug-bash@gnu.org
Message-ID <mailman.7898.1438892582.904.bug-bash@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1438892582 5421 208.118.235.17 (6 Aug 2015 20:23:02 GMT)
X-Complaints-To action@cs.stanford.edu
To <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
User-Agent KMail/4.14.1 (Linux/4.0.0-2-amd64; KDE/4.14.2; x86_64; ; )
X-detected-operating-system by eggs.gnu.org: Windows NT kernel [generic]
X-Received-From 195.55.83.74
X-Mailman-Approved-At Thu, 06 Aug 2015 16:23:01 -0400
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11295

Show key headers only | View raw


Hello.

In section “3.2.4.2 Conditional Constructs” of Bash docs (both in ‘man’ and in the web), at the end, there is an explanation on combining expressions, starting with the use of brackets.

There it would be worth to mention that:
1. you must escape the brackets, also inside script files
2. you have to leave blank/s between the brackets and the expression itself

Point 2 could be inferred merely from the way it's written in the docs., but I don't think it's clear that brackets should be escaped. It took me quite a while and a lot of fumbling to realize that. The rest of operators in this section, like ! or && don't need to be quoted; not even !, which is suspicious of having a different meaning for the shell. I don't know what makes brackets special in this sense, but I guess it should be mentioned. 
-- 
Juanma Menéndez

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


Thread

Worth mentioning in documentation Juanma <juan-manuel.menendez@tecsidel.es> - 2015-08-06 16:13 +0200

csiph-web