The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Counting and sort
.
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 and sort
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
05-23-2006
jim mcnamara
...@...
Join Date: Feb 2004
Location: NM
Posts: 5,808
I'm not sure what the
Quote:
abc-xyz
abc = 0-999
xyz = 0-999
has to do with anything. but for your column of numbers try:
Code:
awk ' {arr[$0]++} END { for(i in arr) { print $i, arrr[i] } } ' filename > newfilename
jim mcnamara
View Public Profile
Find all posts by jim mcnamara
Find jim mcnamara's past nominations received
Find jim mcnamara's present nominations given