One, hand-bound network card
Dual network card binding implementation is to use two network card virtual to become a network card, the aggregation of equipment appears to be a separate Ethernet interface equipment, popular point is that two network
The method of parameter passing in shell script is commonly used in 8 kinds
1. $# the number of parameters passed to the script
2. $* displays all parameter variables passed to the script in a single string. Unlike positional variables, this
First, create test files test.sh
#!/bin/sh
./etc/profile
# Parameters:
# Args[0], data date, date format Yyyy-mm-dd
# Take 30 days before the date
function Get_date_ 30daysbefore ()
{
sec= ' date-d $ +%s '
sec_30daysbefore=$ ((sec-86400*30))
System Information
Processor architecture for arch display machines (1)UNAME-M processor architecture for display machines (2)UNAME-R Displays the kernel version being usedDMIDECODE-Q display hardware system parts-(SMBIOS/DMI)Hdparm-i/dev/hda lists
First, the preface
Using a proxy server haproxy load balancing for MySQL is a common scenario, to improve availability, when a MySQL problem occurs, such as a server failure, or data replication is interrupted, it is best to let haproxy know
DF command
Disk Management
The DF command is used to display the available disk space on a disk partition. The default display unit is KB. You can use this command to get how much space the hard disk is occupied and how much space is left.
Conditional judgment: If statement
Syntax format:
If [expression]
then
Statement (s) to was executed if expression is true
fi
Note: There must be a space between the expression and the square brackets ([]), otherwise there will be a
Objectiveor do you write an automated packaging script today that takes you to get the last file name from the path name. Here is a record of the implementation process. Of course, in the end I will also give the official practice. (PS: Very awkward,
Most people use grep to find the specified process in the PS aux output when they write the shell filtering process, but they also display the grep process, such as finding the pptpd process, which matches two:
Copy Code code as follows:
First script file
Copy Code code as follows:
#!/bin/bash
echo "This are my I-A-bash code!"
Exit 0
redirect Symbols and mathematical calculations
Copy Code code as follows:
#!/bin/bash
Echo-n "The time and
First of all, let's look at the problem description, the following figure is my run-time error screenshot:
Solving method
Analyze the reason, maybe because I have a problem with my platform migration, we have permission to convert.
1 conversion
Find the help process through the man:
[Chengmo@centos5 ~]$ Man-h...F:same as Whatis (1)...
#觉得比较奇怪, what is Whatis?
[Chengmo@centos5 ~]$ Mans Whatis#查询得到是:#whatis-search The Whatis database for complete words.#它是查询whatis数据库的工具
#The Whatis
Scripts written in Bash can also be debugged, just like Python,perl and other interpreted languages. Create a new script named Servinfo and add executable permissions:
Copy Code code as follows:
$ VI Servinfo
#!/bin/bash
echo
1 for statementSyntax formatFor variable in value (or loop condition)DoCommandDoneSend mail to multiple users#! /bin/bashDomain=163.comFor user in Tom Hom JemDoMail-s "Happy New Year" [email protected] $domain DoneTo print 9*9 multiplication
The previous section explains why referencing variables with ${}, ${} also has an important function, that is, text processing, a single line of text can basically meet all your needs.3.1 Get string length# var= ' Hello world! ' # echo $VARhello
The default Simplified Chinese character encoding on Windows is GBK, while Linux is UTF-8 (The description here doesn't seem to be accurate, and the character encoding and character set should not be the same, not clear.). To view the file encoding:(
Remote control using sendkeys in vb.net:Sendkeys has been used in vb6. Remote control is used to indirectly control external programs by sending keyboard events.In vb7, I found that this was useless and it was useless. Later I saw this when I
I have previously written a script similar to mysql full and incremental backup, but it is too simple. Last night, I wrote an instance for mysql5.7 for the company's online server, which is relatively more optimized.Note: This script is only
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