Created
May 14, 2014 09:47
-
-
Save yauhen-info/6f1bc165b3c6eb5f73dc to your computer and use it in GitHub Desktop.
Get matched words, Linux command line
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
The grep -o command will only display matched words and the wc -c command will display the word counts from a text file barfoo.txt: | |
grep -o -w 'foo' barfoo.txt | wc -w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment