Search This Blog

grep to exclude lines with specific strings

grep with -v (invert) option will exclude the match lines in the output:
cat country.txt | grep -v "United States"

No comments:

Post a Comment