autoconf
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: 'set +o' or '. /dev/fd/0' or?...
Date: Mon, 13 Jul 2009 12:51:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

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?

Paolo





reply via email to

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