Skip to content

Instantly share code, notes, and snippets.

@dragonfax
Last active December 13, 2015 17:48
Show Gist options
  • Save dragonfax/4950705 to your computer and use it in GitHub Desktop.
Save dragonfax/4950705 to your computer and use it in GitHub Desktop.
just like grep, but only print the actual matched text, not all of the text from the matching lines.

replace 'blah' with your regex

find ./ -type f -print | xargs perl -ne 'print $1,"\n" if m{(blah)}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment