Shell Scripting Learning

Source: Internet
Author: User

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/82/94/wKiom1dbsIGDuCnRAAH8FIk-588267.png "title=" QQ picture 20160611143136.png "style=" Float:none; "alt=" Wkiom1dbsigducnraah8fik-588267.png "/>

Shell script: Data batch processing, Task batch processing

The shell script file is suffixed with. SH, which is practically meaningless.

Shell Operating principle:

1. Command Relay (Create sub-process, parse execution, return result)

2. Create a process to complete a task

3. Parent process is not affected by child process errors

File/bin/bash, as a binary file, Shell interpreter (not shell script)

The relationship between bash and Shell: Lady Wang and Matchmaker

The first line in the script must be: Tell the interpreter and version, #! Called Shebang

#! Bin/bash

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/82/94/wKiom1dbsH_g8BRnAAB68OHran8417.png "style=" float: none; "title=" 0.png "alt=" Wkiom1dbsh_g8brnaab68ohran8417.png "/>

Bash test.sh

Test.sh is passed as a parameter to the executable file, the child bash,

The running process is as follows:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/82/94/wKiom1dbtXmgLaceAACP74V_FQc433.png "title=" 5305. PNG "alt=" Wkiom1dbtxmglaceaacp74v_fqc433.png "/>

Operating methods are:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/82/94/wKiom1dbsICRsshIAABb_q2d77Q378.png "style=" float: none; "title=" 1.png "alt=" Wkiom1dbsicrsshiaabb_q2d77q378.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/82/92/wKioL1dbsY2QGnygAAA4SVA6qRk084.png "style=" float: none; "title=" 2.png "alt=" Wkiol1dbsy2qgnygaaa4sva6qrk084.png "/>

Cd,export Such commands do not create child processes, the current environment runs directly, such commands are called built-in commands. That is, through bash: the binary inside function call.


This article is from the "Small Stop" blog, please be sure to keep this source http://10541556.blog.51cto.com/10531556/1787929

Shell Scripting Learning

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.