recentpopularlog in

kme : ack   12

GitHub - tomnomnom/gf: A wrapper around grep, to help you grep for things
gf - A wrapper around grep to avoid typing common patterns.

What? Why?

I use grep a lot. When auditing code bases, looking at the output of meg, or just generally dealing with large amounts of data. I often end up using fairly complex patterns like this one:

▶ grep -HnrE '(\$_(POST|GET|COOKIE|REQUEST|SERVER|FILES)|php://(input|stdin))' *

It's really easy to mess up when typing all of that, and it can be hard to know if you haven't got any results because there are non to find, or because you screwed up writing the pattern or chose the wrong flags.

I wrote gf to give names to the pattern and flag combinations I use all the time. So the above command becomes simply:

▶ gf php-sources
go  cli  commandline  searching  textprocessing  patternmatching  regex  grep  alternativeto  ack  ag 
july 2019 by kme
Beyond grep: ack 2.04, a source code search tool for programmers
For Ubuntu/Debian:
sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep
ack  cli  devel  programming  patternmatching  perl  commandline  textprocessing  essential  utility  software 
may 2013 by kme

Copy this bookmark:

to read