LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can I sort the lines in a file? (http://www.linuxquestions.org/questions/linux-software-2/how-can-i-sort-the-lines-in-a-file-383979/)

windhair 11-17-2005 07:59 AM

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?

Thanks

stickman 11-17-2005 08:18 AM

You could use the sort command.

windhair 11-17-2005 08:37 AM

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. :D


All times are GMT -5. The time now is 05:11 AM.