[H-GEN] bash command-line question [was: Re: ...self executing tar.gz's?]
Clinton Roy
croy at dstc.edu.au
Tue Jun 11 19:15:23 EDT 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Tony Nugent <tony at linuxworks.com.au> writes:
> An example of what I'm trying to do:
>
> $ find . -type f -name \*.txt -exec command1 {} ; command2 {} | filter_prog \;
>
> That is, get find's -exec to run a *sequence* of commands on each
> filename it groks. It fails to work. I can produce what I want if
> I create a small shell script and use it thus:
My pre-caffeine response is:
find . -type f -name \*.txt -exec sh -c 'command {} ; command2 {} | filter_prog' \;
hth,
--
Clinton Roy
Meetings - ``Try, or no try; there is no do.''
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list