[ale] find -exec
Danny Cox
danscox at mindspring.com
Thu Jul 18 15:46:59 EDT 2002
Kevin,
On Thu, 2002-07-18 at 15:04, Kevin Krumwiede wrote:
> 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 \;
It's not find in this case, it's the shell. It 'sees' the pipe '|',
and sez okay, it's a pipe! Try escaping it too:
find . -name '*.m3u' -exec cat {} \| grep foo \;
or even worse:
find . -name '*.m3u' -exec cat {} '|' grep foo ';'
and stand well back ;-).
--
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.
Danny
---
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