grep  nobody /etc/passwd 显示/etc/passwd中带有nobody字样的行,区分大小写

grep  -i nobody /etc/passwd 现实/etc/passwd中带有nobody字样的行,不区分大小写

grep -v nobody /etc/passwd 不包含nobody的字样的行

grep -n nobody /etc/passwd 显示包含nobody的行并显示行号

egrep 是扩充功能的grep

egrep '2|5' test 列出含有2或者5的行

egrep '33(2|5)' test 列出包含33,而且后面跟的是2或5的行