I've got two files an old and a new file
File1:
Code:
1,"red"
2,"green"
3,"blue"
File2:
Code:
1,"red"
2,"green"
3,"blue"
4,"purple"
5,"teal"
now doing
Code:
diff file1 file2 > file.diff
touch txt.file
patch -p0 < file.diff txt.file
works great, I get the differences only in a nice text format.
However if I remove say line 3 from the second file, patch will not just give me all the differences of the File2. it will say Hunk 2 has failed and creates a rej file. Then the output from the patch will only have the line that was removed in it. But if I just change line 3 from blue to yellow, it's fine. anyone run into this problem, am i doing it all wrong from the start??