bug-coreutils
[Top][All Lists]
Advanced

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

bug#16095: Problem with --files0-from option


From: Pádraig Brady
Subject: bug#16095: Problem with --files0-from option
Date: Tue, 10 Dec 2013 16:40:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 12/09/2013 10:21 PM, Pádraig Brady wrote:
> tag 16095 notabug
> stop
> 
> On 12/09/2013 09:09 PM, address@hidden wrote:
>>
>> The --files0-from option appears to generate a spurious last iteration.
>>
>> E.g.
>> $ wc --files0-from=file_lis
>>  20  51 343 nyi
>>  25  88 526 parser
>>   6   8  64 rx
>> wc:                          # These lines appear to be bogus
>> : No such file or directory  #
>>  51 147 933 total
>>
>> $ cat file_lis
>> nyiparserrx
>>
>> $ od -a file_lis
>> 0000000   n   y   i nul   p   a   r   s   e   r nul   r   x nul  nl
>> 0000017
> 
> Notice the \n at the end for the file.
> With \0 as the file delimiter \n is allowed in file names
> and thus considered a valid file name to inspect.

I should add that if you don't want to worry about \n in file names,
and want to work with a more standard list, just preprocess like:

tr '\n' '\0' < normal.list | wc --files0-from=-

thanks,
Pádraig.





reply via email to

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