exec
shell builtin to replace process with command
TLDR
Execute a specific command
SYNOPSIS
exec [options] [command] [arguments]
DESCRIPTION
exec replaces the current shell process with the specified command without creating a child process. When exec completes, the shell session ends because the shell process no longer exists.
Built-in shell command commonly used in shell scripts and wrapper scripts.
PARAMETERS
-c
Execute with mostly empty environment-l
Pass command as login shell-a name
Pass name as argv[0] to command
CAVEATS
Shell built-in command. The shell terminates after exec completes. File descriptors can be redirected before exec. Used in init scripts and process management.
