Bash Version: 4.0 Patch Level: 35 Release Status: release Description:
I am used to setting variables in front of a command like in > LANG=C man mplayer However, I get a "bash: syntax error near unexpected token `do'" error when trying: > FOO=BAR while read a b; do echo $a $b; done Why? The similar > FOO=BAR read a b && echo $a $b works fine. (The problem occurred when I tried to temporarily set IFS to the tab character for a "read").