[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkfifo and tee within a function
From: |
Paul Jarc |
Subject: |
Re: mkfifo and tee within a function |
Date: |
Tue, 28 Nov 2006 11:47:22 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
Nathan Coulter <org.gnu.lists.bug-bash@pooryorick.com> 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 regular file, or you can do it without using the filesystem
at all:
cmd_print() { input=`cat` && eval "$input"; }
paul
- mkfifo and tee within a function, Nathan Coulter, 2006/11/28
- Re: mkfifo and tee within a function, Nathan Coulter, 2006/11/28
- mkfifo and tee within a function, Nathan Coulter, 2006/11/28
- Re: mkfifo and tee within a function, Poor Yorick, 2006/11/28
- Re: mkfifo and tee within a function, Poor Yorick, 2006/11/28
- Re: mkfifo and tee within a function, Nathan Coulter, 2006/11/30