execline: the emptyenv program
Keywords: execline command emptyenv

execline
Software
skarnet.org

# The `emptyenv` program

`emptyenv` empties the current environment, or cleans it up; then executes a program.

## Interface

         emptyenv [ -p ] [ -l ] prog...
         emptyenv -c prog...
         emptyenv [ -o ] [ -P ] prog...

By default, `emptyenv` unsets all environment variables, then execs into prog with its arguments. Options control which environment variables are unset.

## Options

- `-p` : keep the `PATH` environment variable.
- `-l` : keep the `LD_LIBRARY_PATH` environment variable.
- `-c` : clean up. Do not empty the environment. Instead, remove every variable used internally by the execline programs, to avoid any interference with or information leakage to external programs.
- `-o` : pop environment variables starting with `ELGETOPT_`. You might want to do this before executing a final program from a script that uses elgetopt.
- `-P` : pop environment variables starting with `#`, `0` to `9`, and `EXECLINE_`. You might want to do this before executing a final program from a script launched by execlineb.