Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: MULTIOS input



On Wed, Jun 27, 2007 at 12:40:33PM -0700, Dave Yost wrote:
> #!/usr/local/packages/zsh/bin/zsh
> echo ZSH_VERSION is $ZSH_VERSION
> setopt MULTIOS
> echo line 2 \
> | (
> cat <<< 'line 1
> ' < /dev/fd/0
> )

This works for me under Linux:

setopt MULTIOS
echo line 2 | (
cat 9<&0 <<< 'line 1' <&9
)

That dups the current fd0 (the pipe) to fd9, and then takes the input
from fd9 after the <<< data.

..wayne..



Messages sorted by: Reverse Date, Date, Thread, Author