Question

I have made program That outputs a text file. I also have a model file which shows me, how its supposed to look. My trouble is I cant find the difference in those files, but diff(in bash) command found some. Can any1 tell what is the difference in those files and how can i fix it. BTW I checked both files with vim (hidden characters enabled) and both have same endfile symbol $. I checked with diff ble.txt bla.txt

  1c1
< TEXT: hi
---
> TEXT: hi

\ No newline at end of file

here are the files http://www56.zippyshare.com/v/55059487/file.html? thx for help guys

Was it helpful?

Solution

Diff is telling you the problem: one of the files does not end with a newline. When editing in vim do

:set fileformat=unix

and save.

You can see the difference with

cat -e ble.txt; cat -e bla.txt

or

od -c ble.txt; od -c bla.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top