'set' is not a good way to check the environment, since it also shows shell variables that are not yet exported. The portable way to check the environment is 'env'.