linux grep not code example

Example 1: grep and

# EXAMPLE: displays any lines that contain either "include this string" or "this works too" 
egrep "include this string|this works too" *

# SYNTAX:
# egrep "<pattern-1>|<pattern-2>" *

# egrep is combined with the "|" character (pipeline: normally the shift alternative to the "\" on the keyboard)

Example 2: grep without match

Just filter your output with:
grep -v "excluded_pattern"
Example to get all not txt files in current directory.
ls | grep -v .txt