On 8/8/10 10:17 PM, mfwit...@gmail.com wrote:
> Interestingly, according to:
>
> info bash 'Basic Shell Features' 'Shell Commands' Pipelines
>
> we have:
>
> A `pipeline' is a sequence of simple commands separated
> by one of the control operators `|' or `|&'.
Sorry, the `simple' should
Dennis Williamson wrote:
> while is a compound command. Only simple commands can have preceding
> variable assignments. From man bash:
Thanks. I just found out that I can get away with
> while IFS=$'\t' read a b; do echo "$a" "$b"; done
On Fri, Aug 6, 2010 at 5:40 AM, Ralf Goertz wrote:
>> 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
>> tok
while is a compound command. Only simple commands can have preceding
variable assignments. From man bash:
The environment for any simple command or function may be augmented
temporarily by prefixing it with parameter assignments, as described
above in PARAMETERS. These assignment statement
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? Th