例如,查找包含有“hello"關鍵詞的行:
cat file.txt | grep hello #實現查看關鍵字的所有行 cat file.txt | grep hello head -n 100 #實現查看關鍵字的前100行 cat file.txt | grep hello | tail -n 100 #實現查看關鍵字的后100行
例如,查找包含有“hello"關鍵詞的行:
cat file.txt | grep hello #實現查看關鍵字的所有行 cat file.txt | grep hello head -n 100 #實現查看關鍵字的前100行 cat file.txt | grep hello | tail -n 100 #實現查看關鍵字的后100行
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。