Variables in Linux

Source: Internet
Author: User
Tags python script


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

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.