Skip to content

Instantly share code, notes, and snippets.

@ilacorda
Created November 18, 2013 19:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ilacorda/7534273 to your computer and use it in GitHub Desktop.
Grep a string-digit-string pattern where the numerical value must have more than one digit and output it to a text file
cat filename.txt | grep -w -o "string [0-9]\{1,\} string" > output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment