Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep first match

Just combine grep with head command for filtering  only the first match as:
grep "match" | head -n 1   #Change 1 to not only match first but further matches
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grep #match
ADD COMMENT
Topic
Name
2+8 =