How to display line numbers in side by side diff in unix?
<p>The scenario is that i have 2 files which i want to diff side by side using the following command with the line numbers:</p>

<pre><code>diff -y file1.txt file2.txt
</code></pre>

<p>and</p>

<pre><code>sdiff file1.txt file2.txt
</code></pre>

<p>The above command just prints the side by side diff but doesn't display the line numbers. Is there any way to do it ? I searched a lot but couldn't find any solutions. I can't use third party tools FYI. <strong>Any genius ideas from anyone ?</strong> </p>

<p><strong>Update:</strong></p>

<p><em>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-l‌​ines" then the line numbers should be omitted which are not shown in the diff.</em></p>