[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; ; ) |
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
- Worth mentioning in documentation,
Juanma <=
- Re: Worth mentioning in documentation, Greg Wooledge, 2015/08/06
- Message not available
- Re: Worth mentioning in documentation, Greg Wooledge, 2015/08/07
- Re: Worth mentioning in documentation, Eduardo A . Bustamante López, 2015/08/07
- Re: Worth mentioning in documentation, Juanma, 2015/08/10
- Re: Worth mentioning in documentation, Greg Wooledge, 2015/08/10
- Re: Worth mentioning in documentation, Bob Proulx, 2015/08/10
- Re: Worth mentioning in documentation, Juanma, 2015/08/11
- Re: Worth mentioning in documentation, Eric Blake, 2015/08/10