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
This article describes a shell script for uppercase and lowercase conversions, learning the use of commands such as TR, awk, and sed. Have a friend in need of reference under
The following script allows you to convert directories or file uppercase
This article mainly introduced in the shell for And while loop detailed summary, this article explained for the For Loop's digital section form, detailed lists, to the file circulation, while loop's three kinds of use situation and so on content,
In doing some Android automation scripts, such as the mobile phone QQ input Chinese chat content, due to the use of Robotium, Appium and other tools to do, because of TX signed verification, so log on QQ. Later only use the most stupid monkeyrunner
The SSH connection to a remote host will ask for a password, like the default behavior of the SU, sudo command, is not read from stdin, the legend is for security considerations, but sometimes in the script does require an unattended landing.
1.if is a single branch statement, using the following format:
if condition; Then
Statement
.....
Fi
2.if ... else is a two-spoke statement, using the following format:
if condition; Then
Statement
....
Else
Statement
....
Fi
3.if ...
This article introduces the Linxu shell of the relevant knowledge of the array, and a lot of examples for reference, including the copy of the array, calculation, deletion, replacement, etc., is to learn the shell array of rare good articles.
The
Since SSH can execute remote command, the FTP software is also gradually less used.
Every time the server code is updated, all want to pack, upload, login to the server to modify file permissions, update Cache, and so on, slow and error prone, so
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
Under Linux You can use the history command to view all the history of a user, while the shell command action record is saved by default in the. bash_history file in the user's directory. Through this file can query the execution history of the
Shell regular Expressions and grep awk find sed sort uniq cut
One, grep
1, basic parameters
GREP-[ACINV] ' search content string ' filename
-A text file search
-C calculates the number of matched rows found
-I ignores case
-N to output the
Loop execution: Repeats a piece of code 0, 1, or more times;Enter the condition: when the condition satisfies, only then enters the circulation;Exit conditions: Each cycle should have an exit condition to have the opportunity to exit the loop;Bash
Transferred from: http://blog.sina.com.cn/s/blog_605f5b4f0101azuc.htmlThe method for creating a named pipe is: Mkfifo pipe_name.This allows you to create a named pipe pipe_name.Run the command and redirect the output to the pipeline and throw the
Practice one: Write a script1. Set the value of the variable file to/etc/passwd2. Say hello to each user in/etc/passwd and say what the ID isShape: (Hint: line= ' wc-l/etc/passwd | Cut-d ""-f1 ")Hello,root,your UID is 0.3. Count the number of
Basic concept01:stringAll of the tests in this article, such as no special instructions, are based on fish shellLet's start with the string, what is the string, and we'll look at a few simple examples?> ~ set param ABC? Echo " string with blank and $
3. Bash 's basic features3.1 Historical Command and command completion (1) History command :#history [Options] [history command Save file]① option:-C: Clears the history command;-W: Writes the history command in the cache to the file ~/.bash_history(
We started the Shell Script debugging series, first explaining the different debugging options, and here's how to enable Shell debug mode.After you finish writing the script, it is recommended that you check the syntax in the script before running
I. Application introductionOur router is embedded with a peanut shell client. After logging on to the peanut shell domain name on the router, we can dynamically associate the WAN port IP address of the router with the IP address of the peanut shell
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