On Tue, Jun 28, 2005 at 11:30:46AM -0400, J. Milgram wrote:
> Am once again stumped by "find"... I want to find files with DOS-style
> CRLF line terminators. This is approximately what I'm trying:
>
> find . -type f -exec file \{\} \| grep -q 'with CRLF line terminators' \;
> -print
>
> But it always bombs, seems to be related to the pipe. Have tried different
> ways to escape different things but no luck.
>
> Anyone know if it's even possible to run an -exec in find that contains a
> pipe like this?
The command you want is 'xargs'
find . -type f | xargs grep -q '...'
- Rob
.