[NTLUG:Discuss] Need help debugging simple script commands

Val W. Harris vwharris at airmail.net
Thu Aug 1 05:45:18 CDT 2002


Rick Matthews wrote:
>>man sed?
> 
> 
> Oh yes, I've 'man sed' many times during this process!
> 
> 
>>It's hard to tell what your garbage is without seeing it.
> 
> 
> Yes sir, I believe you've hit on my point here. As mentioned earlier:
> 
> 
>>>each time I've found trash I've added a step to clean out
>>>that problem. 
>>
> 
> If I knew what the garbage was this would be a completely different
> discussion. The file is about 420,000 lines and 6.5 meg in size. I
> didn't know what trash was in there, or even if there *was* any
> trash in there. Since the -i allowed sort to remove the dups I'm
> assuming that trash *is* the problem, but I still don't know 
> what the trash is (or how much of it there is).
> 
> I'd appreciate any ideas you might have.
> 
> Rick
> 
> 



You'll need a hexdump program and an ASCII chart.  I recommend xxd.
Do a man on xxd and ascii.  Take a snippet of your bad output file
( the one with bad dups in it ), and run it through xxd.  The third
column of output is the ascii text.  It'll contain blanks for the
nonprintable characters.  If all of the printable characters match
over the two offending lines, look in the second column.  This is the
hex value of each character.  Presumably, some of the nonprinting
characters don't match.  You can identify their hex value and then
look it up on the ASCII chart.

Good luck,

Val
-- 
Val W. Harris              vwharris at airmail.net

"If you have tried to do something but couldn't,
you are far better off than if you tried to do
nothing and succeeded" - John T. Ragland, Jr.





More information about the Discuss mailing list