sorting words in CLI output