Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in sdiff command.

Status
Not open for further replies.

unirams

Programmer
Dec 25, 2001
20
IN
Hi Everyone,
I had strange result when i ran sdiff command as below.

Actually i have 2 files, in which file1 has the following content.
X
Y
Z

In File2, i have added one big line in between X and Y as below.

X
TAP_SUB_TRAN_TYP 2 #SubResp 52-pendingE/O, 55-nonpending E/O, 56-nonpending MF, 59-pending MF
Y
Z

When i run sdiff like,
sdiff -l -w 198 File1 File2, my output will be,

X
> TAP_SUB_TRAN_TYP
2 #SubResp 52-pendingE/O, 55-nonpending E/O, 56-nonpen
Y
Z

Listen, in 2nd line some text is missed.

So, in sdiff, i increased, 250 with -w option, now sdiff results with some junk char in front of the newlint started with TAP_SUB_TRAN_TYPE. Please advice me, how i will solve this problem to get the exact line as it is.

Thanks in advance,
Ram
 
i dont like (s)?diff, my be you can solve the problem using 'comm' ------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
sdiff -l -w 250 file1 file2 |od -c
you will find NULL-characters and chars < '\n' , no idea why, this often appens i 'c' if you write over the buffer-limit. ------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top