Friday, May 12, 2017

List Terminal Commands and Utilities and Listing All Text Editors in Posix and Linux

This is a neat command I've not used before in bash:

compgen -c | sort | uniq

That lists all of the commands available.

Getting an (incomplete) list of available text editors is a bit tougher, but we can build on the command above and guess:

compgen -c | sort | uniq | grep '^dit$\|^emacs$\|^uemacs$\|^vi$\|^vim$\|^mu$\|^nano$\|^rnano$\|^pico$\|^jed$\|^joe$'

No comments: