Test sort for command and empty files