Chet Ramey chet.ramey at case.edu writes:
$cmd_print () { mkfifo zout ; (tee zout ); cat zout ; rm zout; }
$printf 'hello\n' | cmd_print
When job control is not active, Posix requires that a command run in the
background with `' behave as if its standard input were /dev/null in the
Nathan Coulter wrote:
Hi,
Within a function, I'd like to print some input to the terminal and at
the same time store it in a fifo fostore some input in a fifo, but am
getting mixed results. In this example, I thought hello would be
output twice:
$cmd_print () { mkfifo zout ; (tee zout
Nathan Coulter [EMAIL PROTECTED] wrote:
My real goal is to feed data to a function and then source it:
$ cmd_print () { mkfifo zout ; (cat - zout ) ; source zout ; rm zout; }
$ cmd_print EOF
$ date
$ EOF
$
As Andreas said, this will be problematic using a fifo. You could do
it with a
Nathan Coulter [EMAIL PROTECTED] writes:
Could anyone please provide a few pointers on how to accomplish this, and
perhaps explain the results from the above examples?
A process writing to a pipe that has no reader will receive EPIPE/SIGPIPE
and die thereof by default. So it all depends on
From: Andreas Schwab [SNIP]
Subject: Re: mkfifo and tee within a function
Sent: 2006-11-28 15:09
Nathan Coulter [SNIP] writes:
Could anyone please provide a few pointers on how to accomplish this, and
perhaps explain the results from the above examples?
A process writing
Hi,
Within a function, I'd like to print some input to the terminal and at the same time
store it in a fifo fostore some input in a fifo, but am getting mixed results. In this
example, I thought hello would be output twice:
$cmd_print () { mkfifo zout ; (tee zout ); cat zout ; rm zout; }
From: Andreas Schwab [EMAIL PROTECTED]
Subject: Re: mkfifo and tee within a function
Sent: 2006-11-28 15:09
Nathan Coulter [EMAIL PROTECTED] writes:
Could anyone please provide a few pointers on how to accomplish this, and
perhaps explain the results from the above examples
From: Andreas Schwab [SNIP]
Subject: Re: mkfifo and tee within a function
Sent: 2006-11-28 15:09
Nathan Coulter [SNIP] writes:
Could anyone please provide a few pointers on how to accomplish this, and
perhaps explain the results from the above examples?
A process writing