reading from printenv and correctly sorting