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
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
Every time you build a new SVN version of the library it's always a lot of fun, so write a section of the script to automate the process, the detailed code is as follows:
The code is as follows
Copy Code
#!/bin/bash# by
To generate a more unordered and complex password, write a script that generates a random password, which is usually done by using the following commandCat/dev/urandom | Head-n 1 | md5sum | Head-c 16All right, no, no, just go straight to the script.
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
To view the script that the process occupies the swap partition
The command script is as follows:
The code is as follows
Copy Code
For i in ' Cd/proc;ls |grep "^[0-9]" |awk ' $ >100 ';d o awk '/swap:/{a=a+$2}end{print '
Today to their own web site to write shell monitoring, to avoid the site hanging I do not know, the script is to check the status of the Web page and Web Connection time, but also according to their own needs to expand, very powerful.Script
#!/bin/Bashnc_start="NC 192.168.76.227 9999"LOOP=100000 for ((i=0;i)) Do eof$ieof DoneThe above example is an example of a call to the NC command to send data to a listening port.Here Nc_start is just an example, before EOF is a variable name
for var inch List Do CommandsdoneIn each iteration, the variable var contains the current value in the list, the first iteration uses the first value in the list, and the second one uses the second value.In do and done, the $var variable
* Multiple? 1 x# annotation Characters\ de-Righteous characters| Pipe character$ as a prefix for variables, used for variables!$ using the last parameter of the previous command; Used in the middle of two commands to write in one line~ User's Home
# **********************************************************************# Description of the Linux shell self-startup script #: # When we are doing the system, writing from the startup script is often the case, the following is a sample analysis. ##
In the actual project, Java sometimes needs to call C write out of things, in addition to JNI, I think a better way is Java call the shell. First write the C to make the executable file, and then write a shell script to execute the executable file,
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.