Skip to content

Instantly share code, notes, and snippets.

@nasamuffin
Created January 29, 2014 20:18
Show Gist options
  • Save nasamuffin/8696094 to your computer and use it in GitHub Desktop.
Save nasamuffin/8696094 to your computer and use it in GitHub Desktop.
Finds files containing the search string and feeds them to Notepad++. Assumes 'npp' is aliased to the full path of notepad++.exe. Automagically sets focus in each file to the line where the search string matched!
echo $(grep -rIn "$@" | cut -d":" -f1-2 --output-delimiter=" -n" | rev | uniq -f1 | rev ) | xargs -n2 npp &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment