- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sort numerically on second field
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2001 03:39 AM
12-03-2001 03:39 AM
OC-ISUP-ANSI 200110311815.39
OC-ISUP-ANSI-P352 200110311819.37
OC-SS7-AAA 200110311420.41
OC-SS7-AAA-P119 200110311422.15
OC-SS7-AAA-P122 200110311421.31
OC-SS7-P294 200110311754.10
OC-SS7-P396 200110311755.58
OC-TSC 200110311744.45
OC-TSC-P315 200110311814.33
how can I, with sort, list the output in a ascending numerical order.
as you can see, it's sorting alphabetically/numerically on the first field.
The command to produce this btw is:
# swlist -a install_date | grep OC
Thanks to Robin for that!
Later,
Bill
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2001 03:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2001 03:52 AM
12-03-2001 03:52 AM
Re: sort numerically on second field
swlist -a install_date | grep OC | sort -n -k2
notice the -n which tells sort to order numerically rather then lexographically.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2001 03:55 AM
12-03-2001 03:55 AM
Re: sort numerically on second field
swlist -a install_date|grep OC|sort -k 2,2 -t '.'
E.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2001 03:57 AM
12-03-2001 03:57 AM
Re: sort numerically on second field
oopsie, I thought you want it on the second field of the date :)
The solution is:
swlist -a install_date|grep OC|sort -n -k2
E.