[Top][All Lists]

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

Worth mentioning in documentation

From: Juanma
Subject: Worth mentioning in documentation
Date: Thu, 6 Aug 2015 16:13:30 +0200
User-agent: KMail/4.14.1 (Linux/4.0.0-2-amd64; KDE/4.14.2; x86_64; ; )


In section “ 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]