[ale] find -exec
Kevin Krumwiede
krum at smyrnacable.net
Thu Jul 18 15:04:12 EDT 2002
On Sun, 2002-07-14 at 18:28, Geoffrey wrote:
> I've not used the -exec in a long while, rather try:
>
> find . / -name '*.m3u -print |xargs cat
Trouble is, some of the filenames contain spaces. Using find -exec
works with a simple command like cat, but what I really want to do with
the files is much more complicated.
I ended up writing a little script and using it as the argument to
-exec. Problem solved, but now I have to know if there's more elegant
solution. :)
I can't figure out the syntax for running multiple commands with -exec.
For example, find won't handle this:
$ find ./ -name '*.m3u' -exec cat {} | grep foo \;
(Yes, grep foo {} would accomplish the same thing... couldn't think of a
better example.)
You can use more than one -exec statement, but that doesn't do you any
good if you want to pipe output between commands.
Thanks,
Krum
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list