Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
grep first occurence for many matches
Eric Duminil
Programming language:
Whatever
2021-07-11 07:52:35
0
Q:
grep first occurence for many matches
Diamond Louis XIV
Code:
Whatever
2021-08-23 01:42:22
Just use flag -m to define number of occurrences to match: grep -m1 pattern file
0
Tags
many
first
Related
grep nth line after match
grep count lines
grep 2 matches or
grep after match
grep without match
New to Communities?
Join the community