Afficher un message
Vieux 24/03/2008, 19h17   #5
Icarus Sparry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Diff showing only the different characters

On Mon, 24 Mar 2008 07:16:53 -0700, Ragu wrote:

> I have to compare the text file outputs (outputs produced in two
> different platforms). Right now, I sed the two files and then compare
> them. See the script below.
>
> #! /bin/csh
> set sunfile=$1.res
> set vaxfile=$1.out
> sed -f fixvaxf.sed $vaxfile >$vaxfile.1 sed -f fixsunf.sed $sunfile
> >$sunfile.1 diff -bwi $vaxfile.1 $sunfile.1 >$1.diff rm $vaxfile.1

> $sunfile.1
>
> This script produces a diff output such as
>
> 130c130
> < 1 0.0 0.10000E+01 0.67763E-20 0.10000E +01
> -0.23962E-05 0.16255E+01 0.16255E+01 ---
>> 1 0.0 0.10000E+01 0.00000E+00 0.10000E+01
>> -0.23962E-05 0.16255E+01 0.16255E+01

>
> I would prefer an output of
>
> 130c130
> <
> 0.67763E-20
> ---
>> 0.00000E+00

>
> In other words, I want to refine the current diff output to show only
> the different characters in a diff line output. Is there any way to
> produce a diff output like the above? I am a newbie to this forum and
> would welcome any better way of doing the above. Thanks.


See if you have "wdiff" installed.
  Réponse avec citation
 
Page generated in 0,04915 seconds with 9 queries