Upper:
Process oriented:Sequential executionSelect execution: If, caseLoop execution: For, while, until
One, for statement
Format:for variable in list;Statement 1;Statement 2;...DoneExample 1, write a script, add 10 users, and let each user's
If statement formattingIf conditionThenCommandElseCommandFi, don't forget this ending.If statement forgets the end fiThree conditional expressions of Test.sh:line 14:syntax error:unexpected end of Fi if
IfCommandThen ifFunctionThenCommand executed
Programmers are lazy, you know.
Recently in development, you need to use the server's IP and Mac information. But the server is installed on the Linux system, for the multiple network, in the acquisition of IP generated a lot of problems. The
Logical judgment in the shell
Format 1:if condition; Then statement; FI//If the condition is met, then execute the statement[[email protected] shell]# cat if1.sh #!/bin/basha=5if [ $a -gt 3 ]then echo okfi[[email protected] shell]# sh -x if1.sh +
20.10 for Loop
Syntax: for variable name in condition; Do ...; Done
;案例1[[email protected] shell]# cat for.sh#!/bin/bashsum=0for i in `seq 1 100`do sum=$[$sum+$i]doneecho $sum#输出的结果[[email protected] shell]# sh for.sh 5050
a blog distinguishes the state return value in the shell -return-break-continue-exitFirst, The difference and contrast between break, continue, exit, return Condition and loop control and program return value command Knowledge table
(i) SEDSed is a streamlined, non-interactive, streaming editor that enters edit commands and specifies file names on the command line. Then look at the output on the screen.The progressive reading of the file contents is stored in a temporary buffer
The anti-quote bit (') is located above the TAB key of the keyboard, to the left of the 1 key. Note the difference between the single quotation mark (') on the left side of the ENTER key.Plays the role of command substitution in Linux. Command
When the number of TCP connections is very large, the current internal IP, the connection of the external IP is counted[[email protected] account_tcp]# cat account_tcp.sh #!/bin/bash# Statistics the current network connection situation Netstat -na |
1. expr computes the integer variable valueS= ' Expr 2 + 3 'The arithmetic symbol and the parameter must have the space separate;2. Let command let s= (2+3) echo $s 3, for statement
For variable in list
Open After ESXi ssh , the host summary will be prompted with a warning message ;650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/41/wKioL1R9Zj_iQDD2AACxLMlbQlw314.jpg "/>The solution is as follows :
VSphere Client Log in to
Joined the caravan for some time, see the group inside the big head to check the blog, only to realize that I have not written homework. As the saying goes, the time is to kill the Pig knife!!! Cough, actually want to say, horse brother Video is
Sed command
Sed only edits the copy of the original file in the buffer and does not change the source file. Therefore, to save the file, you must redirect it to another file.
Sed:
1. Sed [Option] 'sed command 'input file
2. Sed [Option]-F sed script
Document directory
From Ubuntu Chinese
RedHat gnome terminal shortcut
Http://huangchao200701.javaeye.com/blog/263002
CommonWin + n switch Background Color StyleAlt + TAB = needless to say.Win + TAB switch if 3D effect is enabledCTRL + ALT +
This is a consulting report on csdn today. I think it is very practical, and I have never paid attention to shell and the potential of graphics before. So I would like to take a note.
By Martin Streicher, http://sd.csdn.net/a/20110420/296194.html
Summary: three methods of executing shell scripts, fork, source and exec, are summarized.
Prerequisites
1. any program we run is a child process generated by the parent process. After the child process is completed, it is returned to the parent
Kafree collection
Source: The source cannot be determined for Forum reprinting. Please contact us if you have any copyright questions.
1. Stream Object
Component: "Adodb. Stream"
There are the following methods:
Cancel Method
The usage is as
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