On 01/03/2011 11:41 PM, Jan Schampera 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
On 1/4/11 10:05 AM, Eric Blake wrote:
> On 01/03/2011 11:41 PM, Jan Schampera 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
[adding David Korn for a ksh bug]
On 01/04/2011 08:25 AM, Chet Ramey wrote:
>> getopts also suffers from a difference in behavior between shells on
>> readonly arguments:
>>
>> $ ksh -c 'readonly foo; getopts a: foo -a blah; echo $?'
>> ksh[1]: ksh: foo: is read only
>> $ echo $?
>> 2
>> $ bash -c
hi, i am trying to add a feature for bash's builtin cmd "cd" , and i
met some problems
1, currently i just find the opt parsing block, and i got know how to
add a new option, but i think if i want to public this, its not all
things, some others things like useage need to be change and auto-fix
,b
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale'
I read the manual hastily.
Sorry for message and thank you for perfect answer.
On 1/4/11 10:35 AM, Eric Blake wrote:
>> The shell should not exit on an assignment error with getopts, since
>> getopts is not a special builtin.
>
> Good point - 'unset' is different than 'getopts' or 'read' when it comes
> to special builtin status, and I agree that only special builtins are
>