Solved

vim  command to alphabetize lines in a file

Posted on 2012-04-07
2
569 Views
Last Modified: 2012-04-08
I'm looking for a vim command that will alphabetize the lines in a file. That is:

pear
apple
orange


..would change to..

apple
pear
orange
0
Comment
Question by:zumpoof
2 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 37820381
0
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 500 total points
ID: 37820408
vim :%!sort
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weird Samba Connectivity Issue... 7 40
Choosing CentOS 16 80
wipe a usb using python 5 47
Why  my code (program) build with old compiler? 11 44
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question