When I run the diff command using diff -yt file1 file2, I get the output in which original lines are truncated.
I tried using -W switch with diff. However, that does not produce exact output as I want. Is it possible to show entire line of file1 and file2 in diff command's output?
file1:
This is the first sample line in my file1, I want to see full content in the diff result.
file2:
This is the first sample line in my file2, I want to see full content in the diff result.
Current Result:
diff -yt file1 file2
This is the first sample line in my file1, I want to see full c | This is the first sample line in my file2, I want to see full c
In the side by side difference view, I want:
This is the first sample line in my file1, I want to see full content in the diff result. | This is the first sample line in my file2, I want to see full content in the diff result.
If I provide -W 250, I understand both the file's content will be adjusted in width of 125 characters, correct me if I am wrong. and if that's correct, then what about the files that have longer than 125 characters?
Thanks for the reply Scottn. What I am trying to do is produce a colorful side-by-side difference between two files. and for that, I am parsing the output of diff command and therefore, it is very important to have "|","<" and ">" occur at the same place throughout the diff result. Also, the additional spaces will make the end result ugly.