execline
Software
skarnet.org
The exec program
exec executes the command line it is given.
Interface
exec [ -c ] [ -l ] [ -a argv0 ]prog...
exec execs into prog.... It does nothing else.
Without options, exec can be seen as the execline NOP.
Options
- -c : empty the environment. prog is executed with no environment variables. Warning: prog will run with an empty PATH, so make sure it does not rely on it.
- -l : login. Prepends prog's argv[0] with a dash.
- -a argv0 : argv0. Replace prog's argv[0] with argv0. This is done before adding a dash, if the -l option is also present.
The exec command, along with its options, is designed to emulate
the standard exec shell builtin, which replaces the shell with the
command it is given.