Skip to content

Instantly share code, notes, and snippets.

@artolaluis
Created January 8, 2014 00:32
Show Gist options
  • Save artolaluis/8309532 to your computer and use it in GitHub Desktop.
Save artolaluis/8309532 to your computer and use it in GitHub Desktop.
Quick shell command to find a space-separated list of files that contain a string in a given directory
grep -H -r string_to_find directory_to_search | cut -d: -f1 | sort | uniq | tr "\n" " "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment