automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Automake-NG] [PATCH 3/3] [ng] dist: do not exceed command line leng


From: Eric Blake
Subject: Re: [Automake-NG] [PATCH 3/3] [ng] dist: do not exceed command line length limits, even with many files
Date: Sat, 14 Jul 2012 11:59:37 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

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)/address@hidden
>>
>> I would write
>>
>>      @< $(am__dir)/address@hidden 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.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]