Etiket Arşivi grep only words that like search pattern

Linux: grep only words that like search pattern

Below commandline searches “PS…” pattern in a document.

grep -oh "\w*PS\w*" * somedoc.txt

Resource: http://stackoverflow.com/questions/1546711/can-grep-show-only-words-that-match-search-pattern