[Top][All Lists]

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

Re: 'set +o' or '. /dev/fd/0' or?...

From: Alfred M. Szmidt
Subject: Re: 'set +o' or '. /dev/fd/0' or?...
Date: Mon, 13 Jul 2009 07:06:30 -0400

   Hi autoguys,

   I am piping the output of a script to the shell, and using

      COMMAND | sh

   would not respect the -e/-x settings of the outer shell.  I have thought 
   of two replacements:

      { set +o; COMMAND; } | sh
      COMMAND | . /dev/fd/0

   The second looks nicer, but it's not portable.  Actually I am not sure 
   about the portability of the first, either.

   It's my own little script, so I can use non-portable stuff, but still 
   I'm curious about a portable way to do this.  Ideas?

Can't you use? COMMAND | sh +x

reply via email to

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