If you want to search for an exact string,
grep -F '(some|group)\n' ...
-F
tells grep
to treat the pattern as is, with no interpretation as a regex.
(This is often available as fgrep
as well.)
More Related Contents:
- how does the bash command "grep -v ":0"" work
- How can I manipulate text in bash? [closed]
- How can I pipe stderr, and not stdout?
- Which characters need to be escaped when using Bash?
- How to execute a bash command stored as a string with quotes and asterisk [duplicate]
- Fast way of finding lines in one file that are not in another?
- How to avoid heredoc expanding variables? [duplicate]
- Capturing Groups From a Grep RegEx
- How do I escape the wildcard/asterisk character in bash?
- Variable containing multiple args with quotes in Bash
- How to get the part of a file after the first line that matches a regular expression
- How do I pass in the asterisk character ‘*’ in bash as arguments to my C program?
- How to escape single quotes in Bash/Grep?
- Remove first N lines of a file in place in unix command line
- How to process each output line in a loop?
- Checking if output of a command contains a certain string in a shell script
- How to check if a file contains a specific string using Bash
- Piping tail output though grep twice
- Bash script to cd to directory with spaces in pathname
- Grepping a huge file (80GB) any way to speed it up?
- Waiting for background processes to finish before exiting script
- How to give a pattern for new line in grep?
- How to match a single quote in sed
- Prevent grep returning an error when input doesn’t match
- Grep output with multiple Colors?
- Using grep to search for hex strings in a file
- How to strip out all of the links of an HTML file in Bash or grep or batch and store them in a text file
- How to delete rows from a csv file based on a list values from another file?
- Exactly how do backslashes work within backticks?
- How to grep for case insensitive string in a file?