Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: MULTIOS input
- X-seq: zsh-workers 23626
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: MULTIOS input
- Date: Fri, 29 Jun 2007 17:20:10 -0700
- In-reply-to: <20070629183412.GB31045@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <pdy988306240813c2a86d2607d1@[192.168.1.2]> <20070629183412.GB31045@xxxxxxxxx>
On Jun 29, 11:34am, Wayne Davison wrote:
}
} This works for me under Linux:
}
} setopt MULTIOS
} echo line 2 | (
} cat 9<&0 <<< 'line 1' <&9
} )
This works, too:
echo line 2 | ( cat <<< 'line 1' <<(</dev/fd/0) )
The trick is to force /dev/fd/0 to be opened before <<< changes stdin.
In fact you don't even need to fork the subshell, just use braces:
echo line 2 | { cat <<< 'line 1' <<(</dev/fd/0) }
Messages sorted by:
Reverse Date,
Date,
Thread,
Author