Shell script, a shell start-up process.

Source: Internet
Author: User

#一个shell的启动流程 #shell have some variables, called environment variables, which can be inherited, #比如父shell有 $UID, child shells can have, and inherit the parent shell. #正常我们声明一个变量, a=1, in the child shell, A is empty, and the variable declared by itself cannot be continued. If we declare the variable ourselves, we want the child shell to be able to use [[email protected] wyb]#CatA.SH#!/bin/BashEcho$a # If we declare the variable ourselves, we want the child shell to be able to use it,
#export is a built-in variable, declared by the variable, the child shell can be used directly, or the child shell will not be used. [Email protected] wyb]# export a=1[email protected] wyb]# bash a.SH1


#unse为shell内建指令, delete the variable or function. [Email protected] wyb]# unset a#a=1, in the child shell, A is empty [[email protected] wyb]# a=1[email protected] wyb]# bash a.SH[email protected] wyb]#

Shell script, a shell start-up process.

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.