Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux grep regex return match

-o, --only-matching Show only the part of a matching line that matches PATTERN.

$ egrep -o 'key w+' file 
key word1
key word2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linux #grep #regex #return #match
ADD COMMENT
Topic
Name
7+3 =