Summary: three methods of executing shell scripts, fork, source and exec, are summarized.
Prerequisites
1. any program we run is a child process generated by the parent process. After the child process is completed, it is returned to the parent
What if we wanted to call 1 shell scripts or execute 1 Bash shell commands when we were writing 1 C programs?
In fact, the header file contains 1 function system () that calls the shell command or script, and it is convenient to simply pass the
I. Basic Shell syntax1. VariablesBy convention, Shell variables are composed of uppercase letters and underscores (_). There are two types of Shell variables:Environment VariableEnvironment variables can be transmitted from the parent process to the
IBM developer articles are good, there is no saying that the use of GDB multi-process debugging Tian Qiang (tianq@cn.ibm.com ),Software Engineer, IBM China Software Development CenterIntroduction:GDB is a common debugging tool in Linux. This article
When we talked about the number of scripts being executed in CU a few days ago, we found that we knew little about how to execute commands in shell... thank you for your advice! In addition to being inaccurate in some places, his statement is
Shell
The shell also has a way of executing commands called batching (Batch), in which the user writes a shell script, which has many commands that allow the shell to execute the commands one at a time without having to hit the command one by one.
Before introducing what shell is, let's review the relationship between users and computer systems. We know that computer operations cannot leave hardware, but users cannot directly drive hardware, hardware drivers can only be controlled through a
The difference between a point command in the shell and the source command1 shell script Execution methodsThere are two ways to execute shell scripts, one is to create a new shell, and then execute the corresponding shell scripts, one that executes
1. shell script execution Method
There are two ways to execute shell scripts. One is to generate a new shell and then execute the corresponding shell scripts. The other is to execute the shell in the current shell and no longer enable other
Fully interpreting Linux environment variablesI. Overview
Environment Variable: Bash shell uses a feature called "environment variables" to store information about shell sessions and work environments. It allows you to store data in memory, this
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.