With Ubuntu's gedit text editor how can I sort lines in a text file alphabetically?
Ubuntu – How to sort lines in a text file alphabetically with gedit
gedit
gedit
With Ubuntu's gedit text editor how can I sort lines in a text file alphabetically?
Best Answer
answer for gedit 3.10.4 - ubuntu 14.04 && gedit 3.18.3 - ubuntu 16.04
you'll first have to install a plugin for gedit. it just takes a few clicks and no reboot.
Open gedit
Click Edit, select Preferences
Click Plugins, check Sort
Open the text file you want to work with or be sure changes are saved before you test it as you're unable to undo anything after sorting with gedit. (update - it seems that changes can be reverted in 16.04, not sure since what gedit version)
If you want to sort a portion of the file, highlight what you want sorted else leave all selected by default.
(gedit 3.10.4 - ubuntu 14.04) Click Edit, Click Sort..., Click Sort
(gedit 3.18.3 - ubuntu 16.04) Click Tools, Click Sort..., Click Sort