Created
October 24, 2014 13:38
-
-
Save nelanka/819d05688c3304dc1a49 to your computer and use it in GitHub Desktop.
Grep-Fu!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -o '.\{0,20\}test_pattern.\{0,20\}' – | |
portion on left is how many characters before match and portion on right is how many characters after match | |
using this to pull out unique RICS from a json string where they are suffixed by the text (RIC) | |
grep -o '.\{0,7\}(RIC).\{0,0\}' junitResult.xml | uniq | sort | cut -d " " -f 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment