Sort the environment output.