bug-bash
[Top][All Lists]
Advanced

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

Re: set command overrides my ARGV array


From: Martin MOKREJŠ
Subject: Re: set command overrides my ARGV array
Date: Sun, 8 Jan 2017 17:25:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

Hi,
  I forgot to say thanks to all of you who responded. I think the manual page 
needs improvement. This is just confusing.
Martin

Eric Blake wrote:
> On 12/27/2016 10:21 AM, Martin MOKREJŠ wrote:
>> Hi,
>>   I wanted to enable error code reporting for piped processes. This
>> should be doable by "set -o pipeline on". The problem is it kills my $*
>> array and defines $1="on".
> 
> That's because you used the wrong syntax.
> 
> 'set -o pipefail' turns it on,
> 'set +o pipefail' turns it off
> 
> 'set -o pipefail on' is the same as 'set -o pipefail; set on', which
> turns it on but also changes $*.



reply via email to

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