LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-07-2006, 09:32 AM   #1
ravi.ravix
LQ Newbie
 
Registered: Jun 2006
Posts: 3

Rep: Reputation: 0
sort +r ??


The ancient program 'sort' used options like '+2' to sort the output by the field pos. 3.
But now the GNU option for the same is '--key=x,y' but still i am not able 2 get the desired output can u tell me why.
 
Old 07-07-2006, 09:52 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You'd have to give us a sample of what you're sorting and the command line you tried then tell us what result you expected and didn't get.

FYI: You don't need the ,y (sort -k2 will sort by field 2).

The reason we need what your sorting is it could be numeric in which case you'd have to add -n, or it could use an unexpected delimiter in which case you'd need to specify with -t. There could be other issues as well (do you have non-printing characters in your input for example)?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ Sort() bendeco13 Programming 2 11-02-2005 11:26 PM
'c' 10int sort ']['HeBroken Programming 9 11-11-2004 12:17 AM
Hello (sort of...) Gethyn LinuxQuestions.org Member Intro 1 10-15-2004 12:10 PM
sort pantera Programming 5 05-26-2004 07:36 PM
sort of struck alexfoss Linux - Newbie 1 08-10-2003 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration