running following command on zsh
zsh$ echo Hello | read str ; echo "str is: "$str
str is: Hello
whereas in bash, it doesn't work
bash$ echo Hello | read str ; echo "str is: "$str
str is:
This thread mentions read
command runs in subshell so current session has no clue about it. I'm not able to find why it works in zsh.