coreutils
[Top][All Lists]
Advanced

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

Re: process the output of $() with files with spaces


From: Bernhard Voelker
Subject: Re: process the output of $() with files with spaces
Date: Mon, 19 Aug 2013 22:27:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 08/19/2013 10:14 PM, Bob Proulx wrote:
> Bernhard Voelker wrote:
>>   $ printf "%s\0" *.pdf | sort -zV | xargs -0 cat
> 
> It may be the same thing but as a matter of taste I prefer 'find'.
> 
>   find . -maxdepth 1 -name '*.pdf' -print0 | sort -zV | xargs -0 cat

+1
as find(1) offers even more options to restrict the output
to the desired files, e.g. using "-type f" etc.
... depends on the exact use case.

Have a nice day,
Berny



reply via email to

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