The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
awk - sort, then print the high value for each group
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
awk - sort, then print the high value for each group
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
02-11-2009
gio001
Registered User
Join Date: Mar 2007
Posts: 70
Hello,
I am amazed of how smooth the code is ...can you explain a little in words what is the logic of the line:
max[$1] = !($1 in max) ? $2 : ($2 > max[$1]) ? $2 : max[$1]
Thanks.
Last edited by gio001; 02-11-2009 at
04:39 PM
..
gio001
View Public Profile
Find all posts by gio001
Find gio001's past nominations received
Find gio001's present nominations given