Wednesday, February 02, 2011

Turning on bash's globstar ...


magilla@think:~/Desktop$ shopt -s globstar
magilla@think:~/Desktop$ shopt globstar
globstar on


Helps with recursive grep - you can then use

# grep -inH "find_this_expr" **/*.[CcHh]

or similar to recurse into all subdirs.

No comments: