Philip Lijnzaad <lijnzaad@ebi.ac.uk> writes:
> (I was actually exploring why on earth echo foo | read bar; echo $bar does
> not work; I consider this a bug as well, perhaps not as 'blatant' as the
> above one, but puzzling nonetheless).
See question E4 in the FAQ; each command in a pipeline is run in a
separate process, so the process that performs the "read" commands is
not the process that performs the subsequent "echo" command. You may
find this useful: read var < <(command)
paul