EXEC(1)

NAME
exec - execute the command line it is given

SYNOPSIS
exec [-c] [-l] [-a argv0] prog...

DESCRIPTION
exec exec(3) s 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.

SEE ALSO
emptyenv(1), envfile(1), execline-cd(1), execline-umask(1), exit(1), export(1), fdblock(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getcwd(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), posix-umask(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1), exec(3)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/exec.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)