"Eloy A. Paris" <[EMAIL PROTECTED]> writes: > Witold Grabysz <[EMAIL PROTECTED]> wrote: > > : the following phrase doesn't work in bash: > : ((ls);(ls)) > : Why? Is it not allowed by the shell syntax or there is a bug in it? > > Yup, you're right; it's probably a bug. This does work: > > ( (ls);(ls)) >
It's not a bug but a feature. In the bash 1.x version this syntax was possible. In bash 2.x ((expression)) is an evaluation of the arithmetic expression. Here a short excerpt from /usr/doc/bash/NEWS.gz: kkk. The ksh-like ((...)) arithmetic command syntax has been implemented. This is exactly equivalent to `let "..."'. BTW: Should I prefer $(( )) to (( )), which one of these is Posix? Torsten -- I haven't lost my mind -- it's backed up on tape somewhere. Fortune Cookie PGP Public key available -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .