Fork (/directory/script.sh): If the shell contains execution commands, then the subcommand does not affect the parent's commands, and then executes the parent command after the subcommands have finished executing. The children's environment
Three different methods (fork, exec, source) fork (/directory/script. sh) fork is the most common, that is, directly using/directory/script in the script. sh to call the script. sh script. run a sub-sh... three different methods (fork, exec, source)
Original link: http://blog.chinaunix.net/uid-22548820-id-3181798.html
Fork (/directory/script.sh): If the shell contains execution commands, the subcommands do not affect the parent's commands. When the subcommand executes and then executes
Three different methods (fork, exec, source) fork (/directory/script. sh) fork is the most common, that is, directly using/directory/script in the script. sh to call the script. sh script. run a sub-shell script to execute the call. When sub-shell
The EXEC function under Linux is not a single function, but a function group, respectively:
int execl (const char *path, const char *arg, ...);
int EXECLP (const char *file, const char *arg, ...);
int execle (const char *path, const char *arg, ...,
Due to work needs, it took some time to study the two built-in special commands of eval and exec. Because not many are used, it is a bit obscure ..
1. Eval
This command is a built-in command in bashshell, which is a little more difficult than other
1. What is a shell script?It is a scripting language, not a programming language.You can use some logical judgments, loops, and other syntax.You can customize the sub-function, which is a collection of system commands.Shell scripts enable automated
Refer to: Linux commands, editors, and shell programming, and advanced programming in UNIX environment
Both exec and source are Bash Internal commands (builtins commands). Enter man exec or man source in Bash to view all internal command
From: http://mindream.wang.blog.163.com/blog/static/2325122220084624318692/Fork (/directory/script. Sh)Fork is the most common. It uses/directory/script. Sh directly in the script to call the script. Sh script.Run a sub-shell script to execute the
Both exec and source belong to the Bash Internal command (builtins commands), which is entered under bash for man exec or
Man source can view all the internal command information.
The bash shell commands fall into two categories: external commands
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.