ファイル内のユニーク文字列を取得する・sort, uniq †ファイル内から重複する文字列を削除するにはsortコマンドとuniqコマンドを利用します。 コマンド実行例 †下記例は、data.txt内のユニークな文字列を取得する例です。 sort data.txt | uniq cat data.txt | sort | uniq 実行結果 †$cat data.txt RED GREEN BLUE RED RED PINK YELLOW GRAY GREEN YELLOW BLUE $sort data.txt | uniq BLUE GRAY GREEN PINK RED YELLOW |