#grep [参数] 【匹配项】文件A 文件B……
grep -i the text.txt
#忽略the的大小写在文件中进行匹配
grep -v the text.txt
#在文件中匹配不含the行
grep -n the text.txt
#在文件中匹配the并且显示行号
grep -c the text.txt
#统计匹配字符串的行数
grep -h the text.txt words.txt
#查询多个文件,不显示文件名
grep -l the text.txt words.txt
#查询多个文件时,输出含匹配项的文件
grep -w the text.txt words.txt
#完全匹配the 不包括串中含the