Shell is an interactive command interpreter. Shell is independent of the operating system. This design allows you to flexibly choose the appropriate shell. Shell You can type a command in the command line,After being explained by shell, it is
It is for entertainment only and is not responsible for the result of misoperations.
1. Remote copyRoot@192.168.1.38:/f/u/C/k.txt.Root@192.168.1.38 SCP-r-p1234:/beauty.
2. Force Overwrite\ CP-r/data/data1
3. synchronous copy of
◆ Parameter description-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory
Shell:
Shell Baidu Encyclopedia: Baidu. It receives user commands and calls corresponding applications. It is also a programming language. As a command language, it interactively interprets and executes user-entered commands or automatically
Sometimes we need to check the correctness of IP input and the correctness of the network mask, written in shell script:
# Verify IP address correctness check_ip_format () {echo $1 | grep "^ [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}\. [
Introduction: for some programs that need to run for a long time (such as server programs), it is necessary to write a monitoring program to enable automatic restart upon unexpected exit. This function can be implemented through a simple shell
First, let's talk about the basic idea of shell sorting: First take an integer D1 less than N as the first increment, and divide all the records of the file into D1 groups. All records whose distance is a multiple of DL are placed in the same group.
Shell basics 5: Input and Output (echo, read, Cat, pipeline, Tee, redirection, etc)
All the environments below are tested in RedHat Linux9In Linux, to make the Escape Character take effect, you need to add the parameter-eStart with the echo
You can use the am command to start an existing app in the system in the command line mode.
The ADB shell enters the command line.
Press enter to view the help information about AM.
The meaning of each parameter is not described here. Just give a
#!/bin/sh#for exm to test# ./check.sh 12 36 25 12 453 1 2 3 RETVAL=0SRRVER_START=1SRRVER_STOP=2DNS_STATUS=1dnsCheck(){ while test "x`pidof dnsmasq`" != x ; do echo "check DNS status...................."
1. condition test
Two formats: test condition or [condition] (Note that spaces are added on both sides)Condition can be a logical operation of multiple sub-conditions. The logical operator numbers include:
-A logic and
-O logic or
! Logic No
&, |
2.
1. Bash script parameter Processing
Bash parameters can be accessed by adding a numerical number to $, where:
$ # Indicates the number of Script Parameters
$1 indicates the script's 1st parameters.
$2 represents the 2nd parameters of the
Location parameters in bash shell $ #, $ *, $ @, $0, $1, $2... and special parameters $ ?, Meaning of $-and so on
In bash shellOftenWhen you see some special symbols, I will collect them for reference:
Location parameters:For details, see ABS
Document directory
1. Use of shell Array
2. awk Array Operations
3. shell parameter problems
4. How to output single quotes in awk
5. Methods for connecting awk and shell strings
1. Use of shell Array
Value assignment: All = (6 5 4 3 1 8 9 10)
In the previous blog, I introduced the Linux Web page capture instance. In this example, the proxy server is used to capture webpages outside of Google Play.
Proxy Purpose
In fact, in addition to capturing foreign web pages, IP proxy is required,
Chapter 4 directory operations
4.3.1 column directory
$ Ls directory
-D option, force to display only the directory name, not the content
4.4 operation directory
4.4.1 create a directory
Mkdir directory
Example: $ mkdir hw1
Create the hw1
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