bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read-command


From: Paul Jarc
Subject: Re: read-command
Date: Wed, 11 Jul 2001 11:44:49 -0400
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

-pbh- <pbh@pdq.net> writes:
> An easy test is as follows:
> echo "thank goodness its friday" | read a b; echo "a=$a, b=$b"

bash forks for each command in a pipeline, so the read works, but it's
in a child process, so it doesn't affect the original shell.  You can
work around it like this:
read a b < <(echo "thank goodness its friday")
There are other workaraounds in the FAQ.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]