I have 2 files for which i want to diff side by side using the following command with the line numbers:
diff -y abc1.txt abc2.txt
The above command just prints the side by side diff but doesn't display the line numbers associated with the files.
I even tried:
diff -y --unchanged-line-format="" --new-line-format=":%dn: %L" abc1.txt abc2.txt
But it gives some format conflict exception. Is there any way to do it ? I have searched a lot but couldn't find any solutions for it. I can't use third party tools just for your information. Any brilliant ideas are highly appreciated.
NOTE:
I want the file numbers present of the file itself and not the line numbers generated by piping to cat -n etc.. Lets say, i am doing diff using "--suppress-common-lines" then the line numbers should be omitted which are not shown in the diff. I want to display the line numbers associated with the files. I don't want to generate line numbers in my diff output