SedSED: it is called a streaming editor, and its working scenario is typically in the editor, where a piece of text is read in the SED in a row and then output in the specified way, which is its most basic usage.First, the basic operation of
Little brother just contact Linux, a lot of things on Linux is more unfamiliar, so write a blog, as their work summary and technology accumulation bar, but also spur their efforts to learn.The reason for today's title is to put Export,source, Bash's
Read command: Primarily used in the shell to read input, variables, text1. accept input from the standard input (keyboard) and assign the input data to the SET variable"Press Enter--indicates that the input is complete""If more data is entered than
An efficient development environment is undoubtedly of great help to our daily work, and time is saved by these tiny details.Next, I'll show you how to configure ZSH+INCR to create the ultimate and efficient development environment.First, let's look
In shell scripts, all of our variables are stored as strings. So it becomes very important for the interception of strings.In a shell script, if you want to specify a string for interception, there are several ways to do it:The following examples
#!/bin/bashwhile read Linedo for file in/home/local/test/* does if test-f $file then sed-n "/${line }/p "$file >>/home/local/out.txt fi Donedone Task: To file from the Home/local/test folder belowFile_1.logFile_2
Linux There are eight ways to intercept a string. Suppose there is a variable var=http://www.aaa.com/123.htm.1. # Intercept, delete the left character, leave the right character. The code is as follows:Echo ${var#*//}where var is the variable name
several termsMute terminal (dumb terminal):A dumb terminal was usually nothing more thanA monitor and keyboard connected to the Unix system via a communication cable (usually a multiwireSerial cable multi-line serial cable, also called ribbon cable).
Create loops in shell scripts to append echo content redirection to a file650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/82/E7/wKioL1dj6XHwzJ-tAAAoItNjmwc457.png-wh_500x0-wm_3 -wmp_4-s_2295541797.png "title=" qq picture
The summation of 1...100Non-recursive: #!/bin/bash read num count=1 sum=0 val= "" ret= "" while [ $count -le $num ] do if [ $count -eq $num ];then val= $count else val=${count} ' + ' fi
Three ways:1.While Read lineDoDone2.For line in ' cat filename 'DoDone3.Cat FileName | While Read lineDoDoneCases:Reads data from the Math_file file, outputs the maximum, minimum, and average values1.650) this.width=650; "src="
1 #!/bin/bash23 str= "Http://www.baidu.com/test.htm"45 #echo ${str}The result of the operation is:http://www.baidu.com/test.htmMethod One: #截取, delete the left character, leave the right characterEcho ${str#*//}#*//means to delete the first//number
First question: Recursion and non-recursion of Fibonacci sequencesNon-recursive:650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/82/EF/wKiom1dl-8rD92igAAB-pImrC88891.png-wh_500x0-wm_3 -wmp_4-s_582408408.png "title=" series non-recursive
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