Thursday, September 3, 2015

Unix - Get a list of words that match a pattern

Gets you a list of lines that match the above pattern.
grep -oh "th" *
To get a list of the words from the directory which matches a pattern.
grep -oh "\w*th\w*" *

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

1 comment:

  1. The Best 7 casinos and gambling games with bonus codes
    The 전라남도 출장샵 best 광양 출장안마 7 casino 구미 출장마사지 and gambling games with bonus codes · Jackpot City Slots · LeoVegas 당진 출장안마 Slots 경상북도 출장안마 · Ignition Slots · Microgaming Slots · Microgaming Slots · NetEnt Slots.

    ReplyDelete