Grep Anything

- - posted in ruby | Comments

Grep in file (with context)

5 lines before mtach, 5 lines after

1
fgrep jerry@example.com production.log -B 5 -A 5

Grep in Files

search for word in all sub-directories (recursive)

1
grep -r word .

Grep in tail

1
tail -f log/development.log | grep delete

Grep processes

1
pgrep tmux

Comments