[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sort usage [Was: Hi]
From: |
Eric Blake |
Subject: |
Sort usage [Was: Hi] |
Date: |
Wed, 31 Jan 2007 06:27:07 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Choose a more descriptive subject line - my spam-eater nearly skipped over
your message.
According to V.Nadeem Ahmad on 1/30/2007 10:54 PM:
> Hi,
> I would like to kow how can i sort a colomn in a file without changing
> other
> colomn. when I sort i dont want to move my other colomns.
'sort -k2,2' will sort over just the contents of the second column, with
ties broken by the overall line. 'info sort' will give you a better idea
of all the flags that make sort so powerful.
If, on the other hand, you want to extract a column, sort just that, then
reinsert it back into the same location, you should look into cut and
join, alongside sort.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFwJkr84KuGfSFAYARArPPAJ9wTXDu/xXMZaJrOfdulLowO9xBLgCgtJJt
99U/YSBdnWBLUW6thfzkpZg=
=Ka/a
-----END PGP SIGNATURE-----
- Hi, V.Nadeem Ahmad, 2007/01/31
- Sort usage [Was: Hi],
Eric Blake <=