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; }
> Machine Type: i486-pc-linux-gnu
>
> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
>
> Description:
> When I set FIGNORE to 'CVS' it doesn't work as I believe it's meant
> to. Pressing tab in a directory containing files still lists 'CVS' in the
> completion list. However
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 < $> date
> $> EOF
> $>
As Andreas said, this will be problematic using a fifo. You could do
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 o
> 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 proc
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 e
> 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 proc
Hi,
Sorry for not noticing this earlier but bash-3.2 bash has introduced a minor
regression in my build environment (i686-pc-linux-gnu):
warning: some of these tests will fail if you do not have UTF-8
warning: locales installed on your system.
warning: please ignore any differences consisting on