Archimerged Ark Submedes wrote:
Machine Type: i386-redhat-linux-gnu
Bash Version: 3.2
Patch Level: 33
Release Status: release
Description:
gcc accepts the expression S>99?4:S>9?3:S>0?2:0
bash 3.2(33) does not.
I claim this is a bash bug: gcc is perfectly happy with S>99?4:S>9?3:S>0?2:0,
but GNU bash, version 3.2.33(1)-release (i386-redhat-linux-gnu) chokes on
W=$((S>99?4:S>9?3:S>0?2:0)). The bash man page promises that "The operators
and their precedence, associativity, and values are the same as in the
C language."
Thanks for the report; it was an operator precedence problem. It's
fixed for the next version.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/