You are not logged in.
What's the difference, in writing a shell script, between 'command' and 'exec command'?
Offline
From the Advanced Bash Scripting Guide (http://tldp.org/LDP/abs/html/)
exec
This shell builtin replaces the current process with a specified command. Normally, when the shell
encounters a command, it forks off a child process to actually execute the command. Using the exec
builtin, the shell does not fork, and the command exec'ed replaces the shell. When used in a script,
therefore, it forces an exit from the script when the exec'ed command terminates.
Offline
Thanks! Very useful link that definitely made it into my bookmarks.
Offline