Re:Ack is a grep-like tool, optimised for programmers
by a_e_k on Wednesday May 07, 2014 @12:53PM
(#7711259)
Nested searches are handy. They can also be used to find cases of one thing within a few lines of proximity to another:
ack -C5 firstThing | less
/secondThing
One bonus ack trick that I like also like is bulk loading into Emacs for further manipulation (e.g., multi-occur and then occur-edit-mode): emacsclient -n `ack -l functionName`
Nested Search:
Find variable changed yesterday: Find controllers changed yesterday: What files did I work on last week: How many JS commits did I do last month? How many JS commits did I do on each file last month? Change a "classname" from MyClass to BetterName: