-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