Archives by Category
Contact
- Hagen Paul Pfeifer
- http://jauu.net
- hagen@jauu.net (encrypted preferred)
- KeyId: 0x98350C22
- Telephone: +49 174 5455209
Follow this blog
ACK as Grep Replacement
JAN 2012
25
- Published in: programming
- | Time: 00:42:47 CET
- | SHA1: cc715c6013586498a3ea4eb14f93d0ae04c218ca
Not often but sometimes I discover new tools. Today I found ACK:”http://betterthangrep.com/”. There are some nice features:
- exclude git, svn directories
- perl regex
- better highlighting support
- per default 5 lines context
- pattern to exclude searched files
E.g to search the Linux Kernel network subdirectory for TCP SACK code the following command can be used:
ack-grep -CC SACK /usr/src/net-next/net
The CC option specifies that only *.c and *.h files are searched. Under Debian the package the program is called ack-grep.