Skip to content

Instantly share code, notes, and snippets.

@WellingtonEspindula
Last active April 24, 2024 22:36
Show Gist options
  • Save WellingtonEspindula/d8076fde9cc261fb9f88facac0bf8132 to your computer and use it in GitHub Desktop.
Save WellingtonEspindula/d8076fde9cc261fb9f88facac0bf8132 to your computer and use it in GitHub Desktop.
Grep to select the word right after the searched word
grep --color -P '(?<=$SEARCHED_WORD\=)(\s+)?\K([^ ]*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment