Ignore newlines with diff

穿精又带淫゛_ 提交于 2019-12-03 11:13:12

You can pretty print both files using, for example, GNU Indent, http://www.gnu.org/software/indent/ , and then compare them with diff.

There is a tool called "word diff" (tool command line must be 'wdiff') which might help. http://www.gnu.org/software/wdiff/manual/wdiff.html

If you want an all or nothing answer you can first strip the files of newlines:

cat file.txt | tr -d '\n' > stripped.txt 

This is of course very unhelpful for finding actual differences.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!