This might work for you:
sed '/text\|blah/!d' file
some text here
blah blah 123
some other text as well
More Related Contents:
- Is it possible to replace a newline AND another character with a single tab using sed?
- How can I replace each newline (\n) with a space using sed?
- Using different delimiters in sed commands and range addresses
- How to insert strings containing slashes with sed? [duplicate]
- sed fails with “unknown option to `s'” error [closed]
- Combining two sed commands
- How to escape single quote in sed?
- Shell variables in sed script
- Using different delimiters in sed commands and range addresses
- Remove non-ASCII characters from CSV
- Remove multi-line comments
- Insert a line at specific line number with sed or awk
- How to remove trailing whitespaces with sed?
- How to replace the nth occurrence of a string using sed
- Change multiple files
- Remove line if field is duplicate
- delete a column with awk or sed
- Add text at the end of each line
- remove ^M characters from file using sed
- How to use awk to print lines where a field matches a specific string?
- What is the difference between sed and awk? [closed]
- Remove all lines before a match with sed
- sed: Replace part of a line
- Print lines in file from the match line until end of file
- sed gives me “: unexpected EOF (pending }’s) error and I have no idea why
- Have sed ignore non-matching lines
- sed + remove “#” and empty lines with one sed command
- Why is sed not recognizing \t as a tab?
- How to use a bash script variable with sed [duplicate]
- how to delete the duplicate lines in file except the first matched line