As a matter of example : this scripts "rewrites" its final command
depending on optional arguments. Its purpose is to restore select parts
of the environment variables, uid/gid and working directory, that were
saved in a directory at some point in the past.