shell grep搜索出包含指定內容的行


code

macname@localhost Desktop % cat a.txt 
1dededede
2dedefrfr
3frhvfvfvf
4frfrdede
5frfrfrfrf
6frfrede
7jukitttt
8csxssss
9zaxss
10swwww
11ssssss
12aaaaa
macname@localhost Desktop % grep 2 a.txt |wc -l
       2
macname@localhost Desktop % grep 3 a.txt       
3frhvfvfvf
macname@localhost Desktop % 
macname@localhost Desktop % grep 3 a.txt |wc -l
       1
macname@localhost Desktop % 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM