Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Suppress tracing of "set +x"



On Fri, Feb 05, 2016 at 11:09:02AM +0100, Dominik Vogt wrote:
>   set -x
>   some command
>   RC=$?
>   { set +x; } 2>/dev/null
>   test ! x$RC = x0 && exit $RC
> 
> I want only "some command" traced, not "RC=$?".  Yet I have to do
> it before the "set +x" because the latter overwrites $?.

Hm, I tried

  { RC="$?"; set +x; } 2>/dev/null

first and thought it did not work, but it does.  Maybe there was
some typo.  Sorry for the confusion.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany



Messages sorted by: Reverse Date, Date, Thread, Author