[NTLUG:Discuss] sed awk question
    Bobby Wrenn 
    bjwrenn at augustmail.com
       
    Tue Aug 13 10:57:57 CDT 2002
    
    
  
On Monday 12 August 2002 02:03 pm, you wrote:
> sort -t, -k1 test.txt |uniq -t, -W1
uniq didn't like the -t option.
from another post:
>sort -u --key=4,10 file1 > file2
ran ok but did not remove recurring instances of the first field.
from yet another post:
sort -t, -k1 csg.data | awk -F, '
{
        if ($1 != lastsaved) {
                print;
                lastsaved=$1;
        }
}'
I haven't tried this yet because I don't understand it.
Should I make it a shell script and then give the output file as a redirect 
">"? It looks like the input file name "scg.data" is imbedded in the script. 
I can do that but is seems kludgy.
I'm learning but I'm mostly learning how much I have to learn.
Thanks
Bobby
    
    
More information about the Discuss
mailing list