in reply to Searching your code

I've never needed anything more involved than
% find . -name '*.html' | xargs grep -2 'foo'

Replies are listed 'Best First'.
Re^2: Searching your code
by chb (Deacon) on Dec 15, 2004 at 07:20 UTC
    Maybe a bit OT, but what does the -2 option mean ?
      Your grep may not support this option, but mine does (from man grep):
      -C [NUM], -NUM, --context[=NUM] Print NUM lines (default 2) of output context.
      In other words it prints some lines surrounding the match line. Very helpful when dealing with multi-line statements.