shell [ find / grep 的基本使用 ]

来源:互联网 发布:数据库完整性有哪些 编辑:程序博客网 时间:2024/06/06 09:20
find . -newer han2.sh -print | wc -lfind . -newer han2.sh -type f -print | wc -lfind . \( -name "*1*" -or -newer eval.sh \) -type f -print


grep 的初步使用    grep 是 通用正则表达式解析器

grep in words.txt
in there inthi I am goodTom cintheschool fowloer
hp@ubuntu:~/shel$ grep -c in words.txt2hp@ubuntu:~/shel$ grep -v in words.txthello world!hp@ubuntu:~/shel$ grep -cv in words.txt1hp@ubuntu:~/shel$ more words.txthello world!in there inthi I am goodTom cintheschool fowloer
hp@ubuntu:~/shel$ 

grep e$ words2.txtgrep a[[:blank:]] words2.txtgrep Th.[[:space:]] words2.txtgrep -E [a-z]\{10\} words2.txt