Re: set command overrides my ARGV array

2017-01-08 Thread Martin MOKREJŠ
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 b

Re: set command overrides my ARGV array

2016-12-27 Thread Grisha Levit
The syntax is set -o pipefail to turn the option on and set +o pipefail to turn the option off. The word on is not part of the syntax. ​

Re: set command overrides my ARGV array

2016-12-27 Thread Eric Blake
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,

Re: set command overrides my ARGV array

2016-12-27 Thread Greg Wooledge
On Tue, Dec 27, 2016 at 05:21:13PM +0100, Martin MOKREJ?? wrote: > Hi, > I wanted to enable error code reporting for piped processes. This should > be doable by "set -o pipeline on". There is no such set -o keyword. I think you're looking for "set -o pipefail" instead. (Note: there is no "o