[NTLUG:Discuss] Need help debugging simple script commands

Jim Williams jimw at linux-class.com
Thu Aug 1 10:16:28 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 could use tr to remove all non-ascii entries as well. Try "tr -cs 
[a-zA-Z0-9] [\n*]". This will convert anyhting that isn't upper or lower 
case alpha or a number into a newline character. Look at the man or info 
page on tr for more hints.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Williams
RHCE, CCNA, MCSE+I
Contract Systems Administrator &
Certified Technical Instructor
S.Florida: 954.558.2807
Dallas/Ft.Worth: 214.557.3626 
Break Out of the Windows Box!
Explore the possibilities of Open Source Software.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~







More information about the Discuss mailing list