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

RE: sort



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 redhat com [mailto:redhat-list-bounces redhat com]
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 redhat com [mailto:redhat-list-bounces redhat com]
On Behalf Of Aimin Yan
Sent: Saturday, June 17, 2006 11:24 AM
To: redhat-list redhat com
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 redhat com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

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


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