For everyone to be lazy just ~ Write the steps in a script ~
Usage:
bootstrap.sh && gitosis-knstall.sh
GIT installation ~
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
CD
The shell sorting algorithm was first proposed by the D.L shell in 1959, assuming that the elements to be sorted have n, then each insertion sort is not the same as the elements, but goes to an interval.
The shell first sets the interval to N/2,
Working directory There are Mydoc1.txt,mydoc2.txt...mydoc41.txt, would like to use the SED order of values sorted, and then use cat to merge these files, found not to achieve the desired effect, the merge order is as follows:
Copy Code code as
There are a number of ways to bash the shell script, now make a summary. Suppose we write a shell script with the file name hello.sh, the file location in the/data/shell directory, and already have execute permissions.
Method One: Switch to the
In addition to the "If,else" form, there are other forms of "if" statements:
Copy Code code as follows:
if [condition]
Then
Action
Fi
The statement performs an action only if condition is true, otherwise the operation
This article mainly introduces the Linux bash shell in the variable types of detailed, variable types are divided into local variables, local variables, environment variables, position variables and special variables, etc., the need for friends can
Shell Loop: ForThe number of cycles is fixed=====================Shell:For variable name [in value list]DoLoop bodyDoneC Language:for (initial value; condition; step))DoLoop bodyDone=====================Shell loop: While untilThe number of cycles is
This article mainly introduces the 4 methods of executing shell scripts in Linux, that is, the 4 ways to run shell scripts in Linux, and the friends you need can refer to.There are several ways to bash a shell script, and now make a summary. Suppose
In the shell there will be a less common situation, that is, the script sometimes has a time-out phenomenon. Generally speaking, we will use the following script as a "timeout watchdog":#!/bin/bash./$1 & #这里设定后台运行的第一个参数pid = $!
Transferred from: http://my.oschina.net/u/189445/blog/595232
HBase shell command
Describe
Alter
Modify Column family (family) mode
Count
Number of rows in the statistics table
Typically, as a deployment script for an application, the first task that starts is to create a dedicated (dedicated) user and user group for the current app. This script is very easy. Here is a sample of references:#!/bin/shuser=test_usergroup=test_
Reprint: http://www.cnblogs.com/jifeng/archive/2011/06/25/2090118.htmlModify the/etc/ssh/sshd_config file to find Clientaliveinterval 0 and Clientalivecountmax 3 and remove the annotation symbol ("#")Change the corresponding 0 of the
Shell script automatically adds black malicious attack IPSystem environment: Centos 6.5 X64If we open the SSH 22 port to all the users, then we can see in the/var/log/secure file, where the face is full of malicious attacks of IP, then how can we
Query IP on the Web page open URLs can be displayed, but at the command line can be installed w3m/links/lynx these command-line browser, but for this and feel inconvenient, so a lot of IP site to provide unix/linux.Command line query (verbose): Unix/
There is also a very useful feature in Bash's operating environment, which is the wildcard character (wildcard)! It's even easier for us to use bash to process data! Below we list some commonly used wildcard Fu Yi:
Symbol
Special variablesEnvironment variables:The system itself runs a class of variables that need to be created in advance by the Linux systemMainly used for the user's working environment, including (user's host directory, command lookup path, user's
I. Source of the problemSometimes copy some important data, and then need to check with the original data whether the data is consistent. This requires a checksum.Two. Analysis of the problemThere are several ways to verify the data, and the
Linux version: CentOS 6.7//Can be viewed using lsb_release-aFirst, modify the/etc/mail.rc//on the last side of the line, you can also echo >>Set [email protected]//your own real e-mail addressSet smtp=smtp.exmail.qq.com//In mailbox settings, client
In a shell script, the $ A is typically used to display the name of the script, which displays the path name of the script when not using basenameFor exampleCat test5.sh #!/bin/bash # Testing the $ parameter echo the zero parameter is set
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