[Scottish] Best way to find text within files recursively?

Michael Cameron scottish at mailman.lug.org.uk
Tue Jan 21 21:08:01 2003


>I'm not too hot on the -exec syntax for find (this may explain why I can
>never get that part to work and start piping things to xargs, perhaps
>unnecessarily!), I suspect it's the "\;" that I have problems with:
>what's that all about, or is it just "the rule" that you must finish
>your -exec "clause" with it?
>
Pretty much, you terminate the command with a semi colon but it (often) has
to be escaped (or quoted) so that the shell doesn't interpret it first.

The grep -r option is not available in all *nixes which is why I do not
favour it.

MC