The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
counting the data in column
.
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
:
counting the data in column
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
6
(
permalink
)
07-03-2009
vgersh99
Moderator
Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
nawk -f an.awk myFile
an.awk:
Code:
{idx1=$1 OFS $2; idx2=$2 OFS $1} {a[(idx2 in a)?idx2:idx1]++} END { for (i in a) print i, a[i] }
vgersh99
View Public Profile
Find all posts by vgersh99
Find vgersh99's past nominations received
Find vgersh99's present nominations given