Answers for "grep first occurence for many matches"

1

grep first occurence for many matches

Just use flag -m to define number of occurrences to match:
grep -m1 pattern file
Posted by: Guest on October-22-2020

Code answers related to "grep first occurence for many matches"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language