2012年12月25日火曜日

コマンドのお勉強

今日のコマンド :)


[ diff ]

diff -r 元のファイル(ディレクトリ) 新しいファイル(ディレクトリ) > 差分ファイル

   -r : サブディレクトリも含めて比較


[ uniq ], [ sort ]

$ cat happybirthday.txt
Happy Birthday to You!
Happy Birthday to You!
Happy Birthday Dear Tux!
Happy Birthday to You!

$ sort happybirthday.txt
Happy Birthday Dear Tux!
Happy Birthday to You!
Happy Birthday to You!
Happy Birthday to You!

$ sort happybirthday.txt | uniq
Happy Birthday Dear Tux!
Happy Birthday to You!

0 件のコメント: