bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read builtin and readonly variables


From: Dennis Williamson
Subject: Re: read builtin and readonly variables
Date: Tue, 4 Jan 2011 00:55:23 -0600

On Tue, Jan 4, 2011 at 12:41 AM, Jan Schampera <jan.schampera@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]