LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-06-2006, 09:38 PM   #16
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65

I think the options are (in descending order of probable (usefulness * 1/hassle) / 2):
  1. Build and install natsort.
  2. Patch GNU sort. Build. Install.
  3. When you know you'll just have alpha then numeric then alpha, use the sed and sort mechanism above.
  4. Write your own.

The patch for GNU sort from the guy who did natsort is out of date. I talked to the folks in #gnu at freenode, and they said they'd probably consider committing the feature if someone can implement it neatly, and use a nice long option name like --natural-sort (it doesn't deserve a short option apparently... )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script to sort image files dtcs Programming 5 09-26-2006 09:50 PM
bash sort files by date in file name thedude2010 Programming 6 05-12-2006 11:07 AM
bash script to sort files by extension otheralex Programming 7 08-19-2005 02:40 AM
gawk & sort commands in unix fanatic_ravi Linux - Software 0 01-25-2005 04:10 AM
How to loop or sort in bash, awk or sed? j4r0d Programming 1 09-09-2004 03:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:50 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