Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-17-2005, 07:59 AM   #1
LQ Newbie
Registered: Oct 2005
Posts: 16

Rep: Reputation: 0
Unhappy How can I sort the lines in a file?

Hi, all
I have a file withe many lines, the aim is to sort the lines based on the first alphabet of Each line, is there any simple way to do it? such as command in vim?

Old 11-17-2005, 08:18 AM   #2
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You could use the sort command.
Old 11-17-2005, 08:37 AM   #3
LQ Newbie
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks, I just found this works well. I only think about to work it out using vim command.

Great treatures are hiden in Linux, but I can only find tiny part.


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
erase all the lines of a file Prasun1 Linux - General 9 11-06-2005 10:53 AM
Sort file based on only ONE colum smart_sagittari Linux - Newbie 6 07-08-2005 12:25 AM
How to remove lines from a file doza Linux - General 2 04-27-2005 11:59 AM
what sort of file attribute is this: b--Srws-wt BrianK Linux - General 6 12-17-2004 11:26 PM
Reverse Sort Text File BxBoy Linux - General 1 08-02-2004 10:13 AM > Forums > Linux Forums > Linux - Software

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

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