Re: [CentOS] File compare word by word

2009-05-14 Thread Brent L. Bates
 Find the `spiff' utility.  It will compare files word by word and
highlight ONLY the word differences.  One can also compare numbers and change
the resolution of the comparison.  This lets the text "1.0" equally compare to
"0.1e+1" or even "0.9", if the fudge factor is large enough in the second
case.

-- 

  Brent L. Bates (UNIX Sys. Admin.)
  M.S. 912  Phone:(757) 865-1400, x204
  NASA Langley Research CenterFAX:(757) 865-8177
  Hampton, Virginia  23681-0001
  Email: b.l.ba...@larc.nasa.govhttp://www.vigyan.com/~blbates/

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] File compare word by word

2009-05-13 Thread Filipe Brandenburger
Hi,

On Wed, May 13, 2009 at 18:02, MHR  wrote:
> Is there a utility that compares files word by word, instead of whole
> lines or single bytes?

It is not exactly what you are looking for, but have you tried
"vimdiff"? If lines differ, it will highlight the words that are
different in them. It is still line-oriented, so it does not work if
you reformat a paragraph, but if you want to find which parts of a
long command line are different it is quite useful.

HTH,
Filipe
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] File compare word by word

2009-05-13 Thread MHR
Is there a utility that compares files word by word, instead of whole
lines or single bytes?

I found that I can simulate this by replacing all the spaces in a file
with linefeeds, then 'diff -B' the results, but that's kind of awkward
and hard to read when differences that matter come up.

(For the record, I tried using OOo's document comparer, converting to
text and using diff, and a few others, but none of them worked.  I
used to think that running text files through fmt would help, but fmt
is strangely inconsistent as to where it breaks lines, even when the
content within a line or two is identical.)

Thanks.

mhr
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos