going back to my initial problem where I have a bunch of filters defined
in config files and I want to pipe from the input file, through all the
filters, to an output file.
how could I do this with find on the files (I supposed you could do
something with a bunch of temporary files between the filters instead of
pipes, but how do you name them, etc when you don't know how many filters
you will have?)
David Lang
On Thu, 9 Dec 2010, Paul Graydon wrote:
> You'd still fall foul of dodgy file with special characters, surely?
>
> It'd be far better to do find . -name "*.meta" -exec foobar {} \; and
> know that you're a) not going to suffer a blow up due to too many files,
> and b) know it's not going to get screwed up by someone or something
> deciding a space or any other special character that'd need escaped is
> in the list.
>
> Paul
>
> On 12/9/2010 7:33 PM, Brad Knowles wrote:
>> On Dec 9, 2010, at 5:33 PM, Randal L. Schwartz wrote:
>>
>>> Just use the shell:
>>>
>>> for i in *.meta; do echo "something with $i"; done
>> Safer, but I believe that still blows up if there are too many files that
>> match the expression.
>>
>> IMO, it's better to do something like:
>>
>> cd $directory
>> ls -1 | grep '\.meta$'> $tmpfile
>>
>> And then process the $tmpfile line-by-line, using whatever method you prefer.
>>
>> --
>> Brad Knowles<[email protected]>
>> LinkedIn Profile:<http://tinyurl.com/y8kpxu>
>>
>> _______________________________________________
>> Discuss mailing list
>> [email protected]
>> https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
>> This list provided by the League of Professional System Administrators
>> http://lopsa.org/
>>
>
> _______________________________________________
> Discuss mailing list
> [email protected]
> https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
> This list provided by the League of Professional System Administrators
> http://lopsa.org/
>
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
http://lopsa.org/