Linuxshell programming ---- variables and references

Source: Internet
Author: User
Tags echo command
Linuxshell programming ---- variables and references 1 variable 1 variables are used to save useful information, such as path names and file names. variables are essentially one or more memory addresses. 2 variables are divided into three local variables: you can only use Linux shell programming in your current shell lifecycle script-variable and reference 1 variable 1 to save useful information, such as path name and file name, A variable is essentially one or more memory address 2 variables are divided into three local variables: variables that can only be used in the script of the user's current shell life cycle, with the death of the shell process and invalid environment variables: applicable to all the child process location parameters generated by the login process: used to pass parameters to the shell, is the value of the read-only 3 variable = value/1 equals sign can not have space on both sides 2 if there is a space in the value must use "" to enclose 3 variable names can only include uppercase and lowercase letters, numbers, and variable names cannot start with a number. four unset variable names can be used to clear variable values. in shell, there are only two types of variables. Integer and Character 2 references 1 references strings with reference symbols to prevent special characters from being re-interpreted as other meanings by shell scripts, special characters refer to characters that can be interpreted as other meanings in addition to the literal meaning. for example, the literal meaning of the $ symbol is the dollar symbol, but the $ symbol also indicates the end of the line in the regular expression, you can also replace variables. 2 shell four types of reference symbol name meaning "" double quotation marks reference all characters except $, \, and so on. ''single quotation marks reference all characters ?? In the reverse quotes shell, the content of the reverse quotes is interpreted as the system command \ backslash escape character, shielding the meaning of the next character 3 echo 1 function is to print a piece of text on the display, description and description 2 echo command syntax echo option string 3 echo options have two-e options to indicate that the escape character is followed by a special character to be interpreted as a special meaning-n option it indicates that no line breaks are generated after the output text, echo is a line feed by default.

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.