Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Shell/Bash
sed until first match
Nicolo
Programming language:
Shell/Bash
2021-06-20 20:39:58
0
Q:
sed until first match
Mahek Pandya
Code:
Shell/Bash
2021-03-18 04:14:58
sed '/[match]/q' file.txt #Include q option at the end to grep untilmatch only
0
Tags
first
Related
sed remove until first occurrence
sed print from match to end of file
grep until third match
sed replace all until match in line
get until last match
regex last match
sed all except last
match first word regex
sed replace from match
sed print all lines except last
sed from match to end of file
sed up to first match
New to Communities?
Join the community