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
Finally, came to the Shell 13 ask the last question ... Long Breath ~ ~ ~ ~ ~
The last thing to introduce is a common "loop" in shell script design.
The so-called loop is the code in the script that repeats itself under certain conditions.
The
System: CentOS 5.xOpenSSL upgrade script content:Cat openssl_update.sh
The code is as follows
Copy Code
#!/bin/bashif [[$EUID-ne 0]]; Thenecho "This script must is run as root" 1>&2Exit 1FiYum-y Install glibc* cpp gcc*
SH is not as easy to define and use arrays as bash and ksh, but you can simulate arrays in other ways.
Method 1 simulates an array by using the SET command and positional parameters
# define array
set ' word 1 ' word2 word3
# Output Array's
Often in the shell script to block other processes, such as MSMTP mail queue script, this script mutex is not correct, the following is the three found in the file to achieve mutual exclusion of the correct approach.
1. The Flock of Util-linux
Head Command Chinese Introduction:
Usage: head [options] ... [File] ...
Displays the first 10 lines of each specified file to standard output.
if more than one file is specified, the filename is given as the file header before each segment
Login protection is a very important link, the following through an illustrated way to give you detailed explanation:
Two days ago, @cyy sent me a picture.
Then I thought about the Ushq SSH login app notification feature, and then just like if
Recently, the Linux batch execution of the script is very interested in looking around the Internet for expect batch execution script, today to share a batch password modification script.
Script content:
Copy Code code as follows:
#!/
As a Linux SA, many parts of the day-to-day operation of the script, and the server's IP is generally static IP or Mac binding, of course, the latter comparison is relatively cumbersome, and the former we can set the host name, IP information,
Today monkey's simple environment configuration, ready to start monkey, but in the Command Control window input Unable to enter the ADB shell, prompted the error "Unknown host service"find the data found that because the computer's 5037 port is
Before entering the ADB shell into the Linux shell environment in CMD, you need to open the Android emulator (this article is for the emulator, not the real machine). If the emulator is started and the Error:device not found error message appears
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
What happens when the program executesWhen you double-click the Terminal program icon on the desktop, a program loaded into the shell opens. The commands you type do not execute directly in the kernel, but interact with the shell first.Command (eg. '
Shell Script Series Tutorial Two: Start Shell programming2.1 How do I write a shell script?(1) The most common use of VI or mcedit to write shell scripts, but you can also use any of your favorite editor;(2) After the script is written, to set
Basic knowledge of Shell programmingThree ways to empty a log1.echo Cary >test.log>test.log2.echo Cary >http://www.qixoo.qixoo.com/test.logEcho >test.log3.echo Cary >test.logCat/dev/null >test.logShell scripts are good at working with plain text
The result of the test is 0 or not 0, 0 is true, and not 0 means false.
Test commandTypically used with statements such as if, while, until, and so on.#test An expression#test [expression]//[trailing space,] preceded by a space
File properties
Continue and break are commonly used in the while, until, select Loop statements, exit this round or all loops under specified conditions, we need to use the example to verify the results of the operation, it is good to understand. But it's really
The previous article, I said, windows in order to change the user to its console interface, and then start from Windows Vista, plan to change this situation, so there isThe advent of PowerShell.1. Compatible Shell commandsTo be compatible with
About SEDSed is an online editor that processes a single line of content at a time.When processing, the currently processed rows are stored in a temporary buffer called pattern space, followed by the SED command to process the contents of the buffer,
Reprint: http://www.linuxawk.com/jiaocheng/83.html6. printf functionsWhen you print the output, you may need to specify the number of spaces between the fields to arrange the columns neatly. Using tabs in the Print function does not guarantee the
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