$ [ -f TiOn.txt ] && { echo a; echo b; }
[ -f TiOn.txt ] && { echo a; echo b; }
+ '[' -f TiOn.txt ']'
+ echo a
a
+ echo b
bNote the difference in syntax:
'(echo $pwd_base; echo $pwd; echo *)'
'{ echo $pwd_base; echo $pwd; echo *;}'list is executed in the current (that is, parent) shell. The { must be followed by a space, and } must be lead by a ';'
$ [ -f TiOn.txt ] && { echo a; echo b }
[ -f TiOn.txt ] && { echo a; echo b }
>— need the ';' at the end!
$ [ -f TiOn.txt ] && { echo a; echo b;}
[ -f TiOn.txt ] && { echo a; echo b;}
+ '[' -f TiOn.txt ']'
+ echo a
a
+ echo b
b— the ending space in not important.
documented on: 1999.11.05 Fri 09:54:18