Operating System - HP-UX
1829853 Members
2436 Online
109993 Solutions
New Discussion

Re: How to make diff ignore line feeds

 
Renda Skandier
Frequent Advisor

How to make diff ignore line feeds

Hi,
I'm trying to use the diff command to compare 2 reports. One has an extra line feed between lines that I don't care about.
I tried diff -w but it didn't help.
I wrote a quick program to see what was at the end of the line and there is always a [00][0A]

Any ideas on how to exclude these?
thanks Renda
2 REPLIES 2
RAC_1
Honored Contributor

Re: How to make diff ignore line feeds

Use tr to delete the extra line feed and then do compare.
There is no substitute to HARDWORK
Amit Agarwal_1
Trusted Contributor

Re: How to make diff ignore line feeds

diff do not support ignoring of the blank lines.

As RAC suggested, the alternative is to create a temp files with 'extra newlines' removed and then do the compare.

I couldn't find any other command either doing the job in one shot.