Start from shell-general Linux technology-Linux programming and kernel information. For more information, see the following. I just learned shell. Make a draft!
SHELL value comparison expression
Eq equal to ge greater than or equal to le less than or equal to ne not equal to gt greater than lt less
Word expression
= Equal! = Not equal
SHELL numeric operation
Expr number + number
$ (Number + number ))
SHELL comparison statement
If
If test $ var
Then .....
Else
.....
Fi
-----------------------------------
If []
SHELL statement
For
For var in list
Do
......
Done
-------------------------------------
While
While cond
Do
....
Done
Until
Until cond
Do
....
Done
The difference between while and unile is that while is executed when the condition is met, while unile is executed when the condition is not met.
SHELL branch statement
If cond1 then
....
Elif cond2 then
....
Elif cond3 then
....
....
Else
....
Fi
--------------------------------------------------------------
Case
Case string in
Str1 | str2)
...
Str3 | str4)
...;;
Str5 | str6)
...;;
*)
...;;
Esac
Echo "usage: inetpanel [start | begin | commence | stop | end | destory | restart | again]"
-------------------------------------------------------------
Select name [in word;] do list; done
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