Solution: find -exec
Hi all!
I reply myself here
On Wed, 29 Jul 1998, Oliver Elphick wrote:
> Ulisses Alonso wrote:
> >
> >Hi all
> >
> >I would like to know if there is a way to make something like this
> >
> >find <some path> -exec command1 {} | command2 \;
>
> I take it you want to run the pipeline `command1 | command2' on each file.
>
> I don't think you can do this with find's own command line; the easiest way
> is probably to write a little script and execute that instead:
[...]
> find <some path> -exec myscript {} \;
I found a better way:
find <some path> -exec bash -c "myfirstcommand {} | mysecondcommand | [...] \;
Note that the use of find's {} is correct here
Regards,
Ulisses
PD: Oracle8 and Informix will be ported to Linux!!!!!!!!!!!!!!!!!!!!!
http://www.infoworld.com/cgi-bin/displayStory.pl?980717.whorlinux.htm
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers." Pablo Picasso
--
Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
Reply to: