Line-end agnostic diff?

后端 未结 7 1788
醉梦人生
醉梦人生 2021-01-01 14:19

I\'m working on a Mac, with some fairly old files. Different files were created by different programs, so some of them end with \\r (Mac) and some with \\n (Unix). I want to

7条回答
  •  醉酒成梦
    2021-01-01 14:30

    This worked for me:

    diff -r --ignore-all-space dir1/ dir2/
    

    I am on OS X and have mixed files from OS X and Windows.

    Credit: http://www.codealpha.net/514/diff-and-ignoring-spaces-and-end-of-lines-unix-dos-eol/

提交回复
热议问题