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

set command overrides my ARGV array

2016-12-27 Thread Martin MOKREJŠ
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". $ bash -x /tmp/a.sh arg1 arg2 arg3 + for f in $* + echo arg1 arg1 + for f in $* + echo arg2 arg2 + for f in $* + echo arg3