echo $PATHvar =aecho $varexport var1=11echo $var access relationship: Whereis yum File/usr/bin/yumvi/usr/bin/python script: Create a sh.sh #!/bin /bash The following statement uses what to parse echo $varvar 1=12echo $var 1sleep 10echo "Hello" echo $var 1sleep 10echo $var 1 Everywhere variables have no effect on parent process sub-processes BAS H sh.sh Background Start &jobs
echo $var 1bash Sh.shecho $var 1
Bash feature copy on write
Extension: ~ Cat ~/etc/ll.txt Cat Root/rtc/ll.txtecho $var 1echo 55 or directly in the shell $var1var=ls$varecho ' $var ' can block Bash's extended strong reference echo "$var" does not prevent Bash's extended anti-quote · Key command on tab keyboard replace echo Whereis ls echo ' Whereis ls ' echo $ (whereis ls) $ take variable
Note the point:
Fork When creating a child process it is a pointer to the data of the parent process to the child process so Linux creates the child process is very fast, but he is a copy on write mechanism is that when the parent process data changes, he will first copy the original parent process value to the child process, And then change the value inside the parent process. If the value of the variable that is copied from the parent process is in the child process, it is the direct amount that gives the variable the value at that time.
Null
Variables in Linux