Mike Frysinger wrote: > $ true > $ echo '<enter> > <ctrl+d> > $ echo $? > 258 > > $ true > $ echo '<enter> > <ctrl+d> > $ echo '<enter> > <ctrl+c> > $ echo $? > 386 > > that doesnt seem right to me :) > > the first test seems fine, and older versions of bash would set 258 for the > second test (not sure if it's correct though), but the third test looks like > a > regression (not clearing exit status completely somewhere ?). > -mike
Wow - how does one find that out? ;) IMHO everything above 255 is wrong. Maybe it could be "fixed" by making the $? expansion only respect the lower 8 bits. Though...weird :) (works in Bash 3 and 4 here) J.