On 07/14/2012 07:59 PM, Eric Blake wrote:
> On 07/14/2012 11:24 AM, Stefano Lattarini wrote:
>> On 07/14/2012 05:13 PM, Akim Demaille wrote:
>>>
>>> Le 13 juil. 2012 à 12:19, Stefano Lattarini a écrit :
>>>
>>>> +  @while read file; do \
> 
>>>> +  done < $(am__dir)/$@-list
>>>
>>> I would write
>>>
>>>     @< $(am__dir)/$@-list while read file; do
>>>     …
>>>     done
>>>
>>> but I guess that's a matter of taste.  Ack.
>>>
>> In this case, you have better taste I guess :-).  But is the above really
>> portable?
> 
> No, it is not.
> 
> <file command
> 
> is portable, but
> 
> <file { compound command; }
> 
> is not.  That is, only simple commands allow you to position a
> redirection before the rest of the command.  'while' is a compound
> command, so the redirection must come last.
> 
Quick and helpful as usual :-)  Thanks Eric.

One question though: is "<file { compound command; }" also non-portable
if we limit ourselves to POSIX shells?

Thanks,
  Stefano

Reply via email to