Sujet : Re: Different variable assignments
De : Lem (at) *nospam* none.invalid (Lem Novantotto)
Groupes : comp.unix.shellDate : 12. Oct 2024, 13:01:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vedofj$5g3v$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.160 (Toresk; )
Il Sat, 12 Oct 2024 13:08:48 +0200, Janis Papanagnou ha scritto:
(Specifically I'm unsure about the 'B' and what you mean by "sub-command
B" in your example(s).)
Waiting for his clarification, I'm thinking that he sees that something
like:
$ input=$(tty) && echo 123456789 | tee $input | grep -o 456 | \
tee $input | read myvar && echo "myvar is $myvar"; input= ; myvar=
123456789
456
myvar is
doesn't work, while of course:
$ input=$(tty) && read myvar < <( echo 123456789 | tee $input | \
grep -o 456 | tee $input ) && echo "myvar is $myvar"; input= ; myvar=
123456789
456
myvar is 456
does work (BTW: here I'm in Bash).
-- Bye, Lem