What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-28 06:12:02
bash return only first line that contains match
# Basic syntax: grep -m 1 "pattern" input_file.txt # Where -m is the maximum number of matching lines to return, i.e. stop # reading the file after m matches # Note, this is more efficient than piping to head because there you # always read the ... Add solution
Best helpers
Ranking is empty