Created
March 1, 2010 18:25
-
-
Save Abica/318638 to your computer and use it in GitHub Desktop.
open grep results in vi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/bin/vigrep | |
#!/bin/sh | |
# open all files containing grep results in vi | |
# usage: | |
# vigrep term directory/ | |
vi $( grep -R $1 $2 | sed 's/:.*//' | uniq | xargs echo ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment