Today on the Internet to see a web connection average time of the shell command, in their own machine tried, found that can not use, incredibly appear awk:fatal:division by zero attempted such a mistake, Mao's own changed the shell command.Original
To the users of the Llustrator software to explain the detailed analysis of the design of exquisite shell effect drawing tutorials.
Tutorial Sharing:
Okay, the above information is small make up to you
Positional parameters can be moved left with the shift command. For example, shift 3 means that the original $ $ is now $ $, the original $ $ $ $ $ $ $ $ The shift command with no parameters is equal to shift 1.
Very useful UNIX command: shift. We
This example shows how to read a specific field (field) from a data file in a Linux shell script and manipulate it. For example, suppose the format of the file Employees.txt is {employee-name}:{employee-id}:{department-name}, separated by a colon,
awk Statistics IP Access times
Now there is a file, the amount of data in the 200多万条 record, want to use the shell of awk to do statistics, the file format is as follows#关键字 #url#ip Address #Test|123|1Test|123|1Test|123|2Test2|12|1Test2|123|1Test2|1
The shell script is so powerful that it always touches the tip of the iceberg.
Shell recursively traverse directory
#!/bin/bashecho "Please input the directory:"Read CdirFor Dir in $ (find $cdir-type D); Todoecho Change to $dirCD $dirLsecho "------
Today, I saw an article with a shell script and a makefile that would automatically download all of the required packages and compile GCC:
The code is as follows
Copy Code
$ # Download the scripts using wget.$
Lattice, as follows:
The code is as follows
Copy Code
[root@myvps1697 201407]# netstat-ntpl|grep sshd|grep-v grep |awk-f: ' {print $} '
In order to solve the problem of space, the 3 of my group have asked all
Script A (test example 1)
The code is as follows
Copy Code
#!/bin/bashEcho ' Your are in the '
Q) Call another script file in the current script file?
Method One: Using source
Script second (test example 2)
Change the contents of the file in each line in the 20140321_files.txt file to Action_begin,Sed-i "s/action/action_begin/g" ' Cat 20140321_files.txt '
Replace the file contents tags in 20140321_files.txt with tags.phpSed-i "s/tags/tags.php/g" ' ls 2
Character: 12345ABCDESplit into:12345ABCDE
Method
echo 12345ABCDE | Awk-f "' {for (i=1;i
echo 12345ABCDE | Sed ' s/./&n/g '
echo 12345ABCDE | Grep-po '. '
echo "12345ABCDE" | Fold-w1
And then
Please 1000! How many 0 are included in the
Are English abbreviations, know the meaning of English is very good to remember.Unequal-ne (not equal)Greater than-GT (greater than)Less than-lt (less than)Greater than or equal to-ge (greater than or equal)Less than or equal to-le (less than or
To get the server IP shell script:
The code is as follows
Copy Code
#!/bin/bashIfconfig | grep ' inet addr: ' | Grep-v ' 127.0.0.1 ' |cut-d:-f2 | awk ' {print '} '
Download Whole Station
WGET-MK
Dim myProcess As New Process () 'first defines a Process variablePrivate Sub button#click (ByVal sender As System. Object, ByVal e As System. EventArgs) Handles Button1.ClickMyProcess. StartInfo. FileName = "Notepad"MyProcess. StartInfo. WindowStyle
By default, Nginx access logs are stored in a file. After a long time, the log content becomes unusually large. It is not conducive to archiving, backup, and analysis of log files. You can run scripts on a daily basis to automatically cut logs and
There is a very important command in Linux that can help us record the commands we have used. It is useful for troubleshooting or intrusion detection in the future. This article organizes the configuration into a script and runs the script directly
On an online server, you do not know what operations have been performed. When you log on to the server,-bash-4.1 # does not display the path. So I searched for a solution on the internet. The following solution can solve the problem:Vim ~ /.
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