Preview of UNIX/コマンド/テキスト処理/uniq
To confirm the changes, click the button at the bottom of the pageuniq ユーティリティは、隣接する行を比較しながら入力ファイ ル を読み取り、各行の内容を出力します。同じ内容の行が連続してい れば、その重複行の内容を 1 回だけ出力します。 内容が同じでも連続していなければ、重複しているとは認識されま せん。
aa cc aa cc bb cc dd ee
% uniq [file1] aa cc bb cc dd ee
% uniq -c [file1] 2 aa cc 1 bb cc 1 dd ee