adb Shell common commands:
Press the OK Key device.press (' Keycode_dpad_center ', ' down_and_up ')
Long Press a key: Device.drag ((236,440), (236,440), 2,10)
The corresponding keys correspond to the following names:
HOME key:
I. Introduction of IFSthe Shell script has a variable called IFS (Internal field seprator), the internal domain delimiter. The full definition is the shell uses the value stored in IFS, which are the space, tab, and newline characters by default, to
[Condition 1-a Condition 2] When 1 and 2 are true [condition 1-o condition 2] when 1 and 2 one is true [! condition] Take counter && and | | Or! unsigned [-D name] && Echo ' is dir ' is true when the name is directory, then the input has the
First, remove the number of occurrences of the shell in the/etc/passwd file: Here is a partial content of a/etc/passwd file. The topic asks to take out the shell and counts the number, the shell refers to the back/bin/bash,/sbin/nologin and so on,
Bash Shell usage notesThe use of the shell is profound, I comb the basic knowledge, tidy up a simple usage, the specific requirements for self-study.1. calculation # echo $ ((1+2)) 3# echo $ ((1+2+3)) 6# echo 3+2+5 |bc102. If usage if [ $i -eq 0
First, use double brackets (()) to calculate#!/bin/bash#a=0for ((b=0; b; b++)); Do ((a=a+b)) // can also be written as a=$ ((a+b)) Done Echo $aSecond, seq, tr, sed, BC together to complete the calculation
for a list of the current path under the directory (not the list of directories) method, and share with you ~ ~1. Using ls-d with wildcard charactersls-d * * 2, ls-f with grep query with/end of the content-F: Displays the directory behind the/ls-f |
Special variables: $#the number of arguments passed to the script; $*displays all parameters passed to the script in a single string. Unlike positional variables, this option can have more than 9 parameters; $$the current process
This script parses the log of the Nginx load balancer:#!/bin/bashif [ $# -eq 0 ]; then echo "Error:please specify logfile. " EXIT0ELSELOG=$1FIIF[!-F$1] ; then echo "Sorry,sir. i cat ' T find this apache log file, pls try again! " exit 0
Tag: Shell time expr wait Shell single, multi, control process use method one, 100 tasks using 200 seconds (normal completion) cat process2.sh #!/bin/bashfunction aaa () { start= ' date "+%s" for ((i=1;iThis article is from the "7928217" blog,
Today, when we look at the/etc/init.d/nginx script, we find that there is a lot of behavior in the script (the space name of the dot). For example, a few lines of file start:if [-r/etc/default/nginx]; Then
Linux shell Programming1) Write a script to complete the user input: 1. First name with 2. Last name, finally shipowner and displayed on the screen: Your full name is: content.1#!/bin/Bash2 #Program:3 # User inputs his first name and last name.
It's recorded in a shell script.. ./file.sh and/file.sh the difference, this article refers to the http://www.lslnet.com/linux/dosc1/39/linux-283534.htm (this blue forest thing should be derived from Chinaunix)A little experiment.Scenario One:VI
Example one;Touch test.shVI test.shInputTest= ' echo ' test* "|grep [a-za-z0-9] |wc-c 'Echo $testSave, Exit VI;SH test.shResult: Echo "test*" |grep [a-za-z0-9] |wc-cDescription not implemented;We modify a pair of single quotes to $ () and the result
The hill Sort method (narrowing increment method) belongs to the sort of insert class, which is the method of dividing the whole sequence into several small sub-sequences to insert the sort separately. Hill Sort is a non-stable sorting algorithm.
Centos shell command line only show-bash-4.1 # do not show the user and path solution,Zookeeper accidentally called the home Directory deletion command today. Although it was not deleted for various reasons, many files and directories in the home
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