The script is mainly from the defined NTP server list to get the server address to synchronize, if the first unsuccessful, will continue to change the address to sync! Not perfect place also please point out!
Copy Code code as follows:
#
1. Simple method
Copy Code code as follows:
$ b=$ ((5*5+5-3/2))
$ echo $b
29
In the Linux shell, we can use $ (()) to put an expression in parentheses to achieve the function of the operation.
2. Other methods:
Using:
Use the MySQL shell command to read the database information, delete the specified fields, and the corresponding files of the field, the Linux platform.
The preceding variable is defined as the data base configuration
Copy Code code as
Copy Code code as follows:
#在后台执行 cmd command
CMD &
#命令序列. Execute multiple commands on the same lineCMD1; Cmd2
Execute multiple commands in a #在当前 shell in a set of forms{cmd1; cmd2;}
Execute multiple commands in a #在子 shell in a set
Copy Code code as follows:
#!/bin/bash
Echo-e ' Date +%y%m%d%h%m '
Echo-e "Pid\t\tswap\t\tproc_name"
# Take out all directories in the/proc directory (the process name is the number is the process, others, such as sys,net, etc. store
The main purpose is to restart the background of more important processes, if the use of killall-9 forced kill, may cause problems. such as database processes. The code is as follows:
Copy Code code as follows:
#!/bin/sh
If [-Z "$"];
Recently saw a group of people chatting to their server has recently been Hung horse, and then want to use a script to monitor the Web directory changes in real-time files, that is, the directory of additions and deletions to the corresponding log
This article describes the implementation of the core file automatic generation configuration method, the following steps:
1. Edit the Environment configuration file, let the shell start automatically set Ulimit
Vi/etc/profile
ulimit-c
There are times when you need to extract files from the RPM package without installing and installing RPM-related libraries and programs, and this little green script can help you achieve your wish.
Note:1. This script comes from the Internet, the
In our system, I wrote a script to update some repository on a regular basis, but occasionally I encountered problems, such as when git pull might be stuck there (possibly due to a network problem at some point), which would hinder the next
This example describes the Jquery.fancybox.js usage of the jquery Pinball plug-in. Share to everyone for your reference, specific as follows:
FancyBox is a jquery plug-in, powerful. Support to enlarge the picture to add shadow effect, for a group
First, take an integer d1 less than n as the first increment, dividing the entire record of the file into D1 groups. All records that are multiples of the DL are placed in the same group. A direct insertion sort is performed within each group, and
The && operator syntax is formatted as follows: Command1 && command2 [&& Command3 ...] 1. Use && connection between commands to implement logic and functions. 2. Only the command on the left of && returns True (command return value $?). = = 0) The
~ Home Catalogue ls ~"Inside the inverted quote is the command echo ' ls ' | ' Echo ls ' | echo ' echo ls ' | ' echo ' echo ls ' replace command $ ()! Take sung with the historical Command (!123) 123 is the history display#代表注视信息$ take Variable
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