#一个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.