[geeks] geeks Digest, Vol 44, Issue 38

William Kirkland bill.kirkland at gmail.com
Sun Jul 30 10:16:21 CDT 2006


I'll get it right ...

I forgot to add the part where it calls itself ...

#! /usr/bin/awk -f
BEGIN {
     for( i=1; i<ARGC; i++ ) {
         list=sprintf( "%s %s", list, ARGV[i] )
     }
     if ( ARGC > 1 )
     system( "sort -t ',' -k 2 -k 1 " list " | /tmp/sort.awk" )
}
FILENAME != "" { next }
{ printf( "%s\n", $0 ) }


On Jul 29, 2006, at 23:45, geeks-request at sunhelp.org wrote:

> [geeks] awk q:  sorting on two different fields



More information about the geeks mailing list