On Tue, Jan 4, 2011 at 12:41 AM, Jan Schampera <jan.schamp...@web.de> wrote: > Hello list, > > > the read builtin command, when trying to assign to a readonly variable after > reading the data, spits an error message. This is fine. > > But the return status is 0. It "always" (down to 2.04 was tested) has been > like that, and it's like that in upcoming 4.2. > > For me, this doesn't make sense. The read may have been successful, but the > data is gone. It would make sense to return !=0 here, IMHO. > > I also quickly cross-read POSIX, since such weirdness usually comes from > there ;-) but I didn't see anything obvious. > > > Regards, > Jan > > -- > Be conservative in what you do, be liberal in what you accept from others. > - jbp, master of the net, in RFC793 > > >
Dash, Ash and Ksh93 return non-zero. Zsh returns 0.