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 regular file, or you can do it without using the filesystem
at all:
cmd_print() { input=`cat` && eval "$input"; }


paul


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to