In Bash, the following command
echo foo | while read line; do echo $line; done
outputs foo; however, the following
alias bar="echo foo | while read line; do echo $line; done"
bar
outputs a \n (or empty space). What is causing this difference in behavior?