RE: sort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As a follow up, you can use the following command and not get rid of the
titles (name, age, income):

cat test | awk '{print $2}' | sort -n

Very Respectfully,
Cesar Covarrubias

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx]
On Behalf Of Cesar Covarrubias
Sent: Saturday, June 17, 2006 11:36 AM
To: 'General Red Hat Linux discussion list'
Subject: RE: sort

Hello,

If you get rid of the titles (name, age, income), you can use the following
command:

cat test | awk '{print $2}' | sort



Cesar 
-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx]
On Behalf Of Aimin Yan
Sent: Saturday, June 17, 2006 11:24 AM
To: redhat-list@xxxxxxxxxx
Subject: sort

i have a file, I want to sort this file based on the 2nd column, and start 
from 1st row.how can
I do use sort command to do in redhat linux.
for example, this is file I want to sort


name  age  income
trorry   34    344
aimin   36    345
shihe   23    3667

Aimin

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux