HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sort help needed
Operating System - HP-UX
1836770
Members
2316
Online
110109
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
06-20-2006 05:35 PM
06-20-2006 05:35 PM
sort help needed
Hi guys,
Could some ont explain the meaning of following sort command,
# sort -t, +1 -2 +2 -3 +3 -4 +4 -5 file_name
Thanks in advance.
Could some ont explain the meaning of following sort command,
# sort -t, +1 -2 +2 -3 +3 -4 +4 -5 file_name
Thanks in advance.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 05:58 PM
06-20-2006 05:58 PM
Re: sort help needed
Thats a sort command with obsolete options used for field_start and field_end (replaced by -k now).
-t, means delimiter is "," and then +1-2 are the field start and end to limit the sort within the fields
-t, means delimiter is "," and then +1-2 are the field start and end to limit the sort within the fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 06:19 PM
06-20-2006 06:19 PM
Re: sort help needed
Sort the file_name with the field separator ','. and then those pluses and minus are field end options where I believe a comma will appear to the right of the first column for a plus and to the left of the 2nd column, and so on to the fifth column.
Try your command on /etc/passwd substituting a : for ,.
Here's a link that says its obsolete:
http://www.rbi.informatik.uni-frankfurt.de/doc/man/hpux/sort.1.html
Try your command on /etc/passwd substituting a : for ,.
Here's a link that says its obsolete:
http://www.rbi.informatik.uni-frankfurt.de/doc/man/hpux/sort.1.html
Support Fatherhood - Stop Family Law
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 07:00 PM
06-20-2006 07:00 PM
Re: sort help needed
Hi Ashwin,
In this sort command, -t is specified for field seperator. So comma (,) is the field seperator. +1 is the field start column and -2 is the field end column and same is the case for +2 -3 ,+3 -4 +4 -5.
But this +position is obsolete now. It is replaced by the -k option.
Regards
Patrick
In this sort command, -t is specified for field seperator. So comma (,) is the field seperator. +1 is the field start column and -2 is the field end column and same is the case for +2 -3 ,+3 -4 +4 -5.
But this +position is obsolete now. It is replaced by the -k option.
Regards
Patrick
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP