TIP: Click on subject to list as thread! ANSI
echo: qedit
to: RON MCLEOD
from: JACK STEIN
date: 1995-09-08 08:39:00
subject: Sorting problem

Ron Mcleod wrote in a message to George De Bruin:
 RM>     I'm trying to sort a LARGE 457K file, a tagline list -
 RM> but I'm getting duplicates of all line entries.  Using
 RM> TSE/JR/2.  Any ideas?         ^^^^^^^^^^
I don't know why that happens, but, my personal solution would be to sort the 
file uniquely before editing the sucker.  This can be done with SORT -u
sort -u -o out.fil infile
or with a simple AWK/GAWK script
GAWK '$0!=lastline {print lastline=$0}' infile >outfile
Both SORT and GAWK are unix utilities that have been ported to OS/2 and well 
suited to what you seem to be doing.  Most heavy text editing can be greatly 
helped by all the Unix text utitilities before loading them into an editor.
Unix has often been called a giant text editing utility, and for good reason. 
Most, if not all, of those reasons have been ported to OS/2.
                                              Jack 
--- timEd/2-B11
---------------
* Origin: Jack's Free Lunch 4OS2 USR16.8 Pgh Pa (412)492-0822 (1:129/171)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.