Linux control structure-general Linux technology-Linux programming and kernel information. The following is a detailed description. Ignore the referenced value in double quotes in Linux, except $ '\.
Ignore all referenced values in single quotes
For example, echo '$ Test'
$ Test
Reverse quotation marks: Use the content as a command
////////////////////////////////////
Condition test: 0 true, 1 false
Test condition or [condition]
1) file [-w 1.txt? O? R 2.txt]
2) string [$ EDITOR = "vi"] = ,! =,-Z,-n
3) value [$ number? Eq "12"]? Eq,-ne,-gt,-lt,-le,-ge
Number of parameters $ #, parameter $ @, exit Status $?
[Function] message ()
{...
}
Message "hello" "world"
Parameter: $1, $2 ,...... $9
It retains the current s h e l and memory information. In addition, if you execute or call another piece of code in a script file, a separate s h e l will be created, thus removing all existing variables defined in the original script.
Once the file is loaded into s h e l, you can call the function in the command line or script. You can use the s e t command to view all definitions.
. The output list contains all functions loaded into s h e l.
To change the function, run the u n s e t command to delete the function from s h e l, even though u n s e t deletes the function to facilitate this function.
Numbers are not available for s h e l or scripts, but they are not actually deleted. After the modification, re-load the file. Some s h e l will identify the changes and do not need to use the u n s e t command, but for security reasons, it is best to use the u n s e t command when changing the function.
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