Created
April 19, 2018 07:53
-
-
Save koki-h/70135d5be9bfbcfa3b0e607675be9048 to your computer and use it in GitHub Desktop.
2つのディレクトリ名を受け取り、それぞれの中にある同名のファイルのdiffを取る
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
| dir1 = ARGV[0] | |
| dir2 = ARGV[1] | |
| Dir.glob("#{dir1}/*").sort.each do | file | | |
| filename = File.basename(file) | |
| puts "#{file} vs #{dir2}/#{filename} :" | |
| puts `sdiff -bBWs #{file} #{dir2}/#{filename}` #side-by-sideで差分のある行だけを表示 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment