Created
January 25, 2018 05:39
-
-
Save koki-h/0f3f0312c5531c7791e032c2173f050a to your computer and use it in GitHub Desktop.
2つのディレクトリに存在する同名のファイルを中身をソートして比較する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sort_diff() { | |
| filename=$1 | |
| echo $filename | |
| sort dst/$filename | (sort src/$filename | diff /dev/fd/3 -) 3<&0 | |
| } | |
| sort_diff sample.txt |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こちらを参考にしました。
https://qiita.com/bsdhack/items/55d5eced2fb3e6625d74