Operating System - HP-UX
1833738 Members
2519 Online
110063 Solutions
New Discussion

Re: Using diff to compare 2 programs

 
SOLVED
Go to solution
Renda Skandier
Frequent Advisor

Using diff to compare 2 programs

I'm trying to compare the source code of 2 C programs. The problem is there was alot of formatting done so diff yeilds thousands of differences.
Is there a way to compare actual text excluding spacing & format differences?
thanks
3 REPLIES 3
Vitek Pepas
Valued Contributor
Solution

Re: Using diff to compare 2 programs

'diff -w' will ignore whitspaces
Paddy_1
Valued Contributor

Re: Using diff to compare 2 programs

diff -ibw would be better as it would ignore case too.
The sufficiency of my merit is to know that my merit is NOT sufficient
Umapathy S
Honored Contributor

Re: Using diff to compare 2 programs

tkdiff is a good tool. Many times I use this to compare files with its original version.
http://www.accurev.com/free/tkdiff/
You need to have tcl/tk installed for this.
http://hpux.connect.org.uk/hppd/hpux/Tcl/tcl-8.3.4/
http://hpux.connect.org.uk/hppd/hpux/Tcl/tk-8.3.4/

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!