The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Need to find the mimimum & maximum
.
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
:
Need to find the mimimum & maximum
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
01-03-2009
2k7.vipin
Registered User
Join Date: Jan 2009
Posts: 5
Try this
cat filename | cut -f2 -d " " | sort -nr | head -1
This is for maximum value -f2 is here for 2nd column for eg
And
cat filename | cut -f2 -d " " | sort -nr | tail -1
For minimum value
2k7.vipin
View Public Profile
Find all posts by 2k7.vipin
Find 2k7.vipin's past nominations received
Find 2k7.vipin's present nominations given