开发者

Same text but nonzero diff

开发者 https://www.devze.com 2023-01-28 16:39 出处:网络
I have two files, the contents of which are exactly same as it appears to my eyes, however, the diff of both shows all lines being different, the reason i suspect has something to do with character fo

I have two files, the contents of which are exactly same as it appears to my eyes, however, the diff of both shows all lines being different, the reason i suspect has something to do with character format/encoding but i am not sure.

The output of "file --mime" on both is same.

Can someone enlighten me on whats going on? and how co开发者_StackOverflow社区uld i possibly change one form to another, some command/tool.


Maybe line endings? Try dos2unix and unix2dos.


It's probably line endings. Is one from a Unix machine and the other from a Windows machine, by any chance?

http://en.wikipedia.org/wiki/Newline#Common_problems

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号