- To: Slug List <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] Max in $2, $3
- From: Terry Collins <terryc@xxxxxxxxxx>
- Date: Tue Jul 3 01:17:02 2001
- Cc: Scott Howard <scott@xxxxxxxxxx>, Andrew Bennetts <andrew@xxxxxxxxxxxx>, Jobst Schmalenbach <jobst@xxxxxxxxxxxxxx>
- Organization: Wombat Outdoor Adventures
Scott Howard wrote:
> That said, you'd be better doing it in a way which wouldnt load anything
> into memory, like awk (presuming positive numbers)
>
> awk ' $2>A { A=$2 } $3>B { B=$3} END { print A,B } '
Yep, that was what I was after.
The file consisted of 134,069 entries like
PD 456,78
in a HPGL plot file. So culling the starting and ending lines, the :,$
s/,/ / to replace the comma by a space and running ScoTt awk line
produced what I needed; the input to the IP paramters (bottom left and
top right of the plot area.
This is alll from trying to fix programs mentioned in the postscript to
HPG converter I am seeking.
Umm, with 134,069+ lines, sort was not an option.
Thanks all.
--
Terry Collins {:-)}}} Ph(02) 4627 2186 Fax(02) 4628 7861
email: terryc@xxxxxxxxxx www: http://www.woa.com.au
WOA Computer Services <lan/wan, linux/unix, novell>
"People without trees are like fish without clean water"