The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
how to sort, and count unique data all at once?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
how to sort, and count unique data all at once?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
05-15-2008
alamitab
Registered User
Join Date: Jan 2007
Posts: 24
number of unic lines:
cat file| awk ' {print $2}' | sort | uniq | wc -l
or show the lines:
cat file| awk ' {print $2}' | sort | uniq
alamitab
View Public Profile
Find all posts by alamitab