jessman1128
Registered
- Joined
- Dec 26, 2007
- Messages
- 909
- Reaction score
- 81
Hey now, don't make me think about work - it's the weekend for cryin' out loud! (I'm a computer programmer - so when I see code my brain instinctively reverts back to thinking about what I was working on last on Friday... )oh ! really ?
% /bin/awk ' BEGIN { OFS=FS="|"; cur=max=0; seen=""}
{
cur = length($2)
if (cur > max ) {
seen = $2 "(" $1" "$2 " from " $NF")"
max = cur
} else if (cur == max) {
seen = seen "\n" $2 "(" $1" "$2 " from " $NF")"
}
}
END { print seen }' <FILENAME>