grep ‘o{2}‘ passwd
egrep ‘o{2}‘ passwd
grep -E ‘o{2}‘ passwd
9.3 grep下
grep ‘oo‘ passwd
grep ‘.‘ passwd
grep ‘o{2}‘ passwd
egrep ‘o{2}‘ passwd
egrep ‘o+‘ passwd
egrep ‘oo?‘ passwd
egrep ‘root|nologin‘ passwd
egrep ‘(oo){2}‘ passwd
扩展
把一个目录下,过滤所有.php文档中含有eval的行
grep -r --include=".php" ‘eval‘ /data/
9.1 正则介绍_grep上 9.2 grep中 9.3 grep下
原文地址:http://blog.51cto.com/13227377/2107276