Linux grepコマンド

grepフィルター検索、パイプ記号: "|"、つまり前のコマンドの処理結果の出力が後続のコマンド処理に渡されることを意味します

-n行番号を表示し、-iは大文字小文字を無視

cat hello.tex | grep yes
ます。hello.txtでyesを見つけて行番号表示ます。行番号表示し、daxiaoxieを
cat hello.tex | grep -n yes
無視します
cat hello.txt | grep -ni yes

元の記事を48件公開 Likes0 訪問数282

おすすめ

転載: blog.csdn.net/qq_44971387/article/details/105329839