bug-bash
[Top][All Lists]
Advanced

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

Re: rewriting a readonly var should exit


From: Aurelien ROUGEMONT
Subject: Re: rewriting a readonly var should exit
Date: Tue, 15 Dec 2015 16:00:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0

On 12/15/2015 03:39 PM, Andreas Schwab wrote:
> Aurelien ROUGEMONT <beorn@gandi.net> writes:
> 
>> Description:
>>      in the posix shell specification [1] when a script tries to to
>> overwrite a readonly variable it should crash the script.
>>
>> Repeat-By:
>>         #!/bin/bash
>>         readonly rovar="goodvalue"
>>         rovar="badvalue"
>>      echo "You should not see this message"
> 
> You are not running the shell in posix mode.
> 
> Andreas.
> 
Oh true. sorry about the noise then. thought bash would behave the same
as sh/dash/manyothersihavetested.

Nevermind

Thanks for the feedback.

-- 
 Aurelien                                  Domain Name Registrar
   \o/                                     Hosting For Geeks and more...
    Gandi.net                                  No Bullshit !

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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