adb Shell Common commands

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:

A summary of---variables, comparisons, and tests used in shell programming

One, variableEnvironment variables, positional variables, pre-defined variables1. Environment VariablesEnv #查看环境变量2. Position variableVI location.sh#!/bin/bashsum= ' expr + $ 'echo "$ + $ = $SUM"./location #则12为第一个位置变了 $1,32 changed the second

Shell Text Word Count

The contents of the Words.txt are as follows:The day is sunny the the the the and the Sunny isCount the occurrences of each word and output in descending order.The Unix pipes script is as follows:Cat TR ' ' ' \ n ' Sort Uniq Sort awk ' {print $, $

Shell creates hive table partition periodically

First look at the help command for hive:[[email protected] hive]$ hive-hmissing argument for option:husage:hive-d,--define Va Riable subsitution to the Apply to hive commands. e.g.-D a=b or--define a=b--database Specify the database to Use-e SQL

A shell script that automatically restarts after the monitoring process hangs on Linux

This article describes the shell script, through a while-do loop, with Ps-ef|grep check whether the loader process is running, if not run, then start to ensure that the crash hangs the process, and automatically restart in a timely manner. The

Special usage of $0,$?,$! in shell

$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ", in the

Shell script to split nginx logs

#!/bin/bashLogs_path= "/opt/nginx/logs/"Pid_path= "/opt/nginx/logs/nginx.pid"MV ${logs_path}access.log ${logs_path}access_$ (date-d "Yesterday" + "%y%m%d"). LogKILL-USR1 ' Cat ${pid_path} 'Crontab-eXX * * * * sh/opt/shell/cutnginx.shThe script

IFS usage in the shell

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

The function and library of Shell learning (I.)

Functions are the essence of the shell, and with functions and libraries, the shell handles complex problems as well as the compiler language, gravitated the importance of shell functions and libraries.1 Definition of functionRecommended UseHow to

Shell Process Control-IF statement

Single-branch If condition statementIf [conditional judgment]; ThenProgramFiExample: Judging partition usage#!/bin/bash# Author:huangrui (email:[email protected]) rate=$(DF-H |grep "sda1"|awk '{print $}'|Cut-F1-D"%") if[$rate-GT the]; Then Echo

Shell script (i)

Shell script (i)1. Common Commands(1) System Management#useradd, a user group with the same user name is created by default when a new user is added#创建用户user1 and specify a UID of 1111, the owning group is 2222 (test), and the home directory is not

Shell Script (ii)

Shell Script (ii)#find查找文件 to find based on time, name, UID, GID, permissions, size, etc.A file or directory accessed within #-amin-10:10 minutes; a file or directory accessed +10:10 minutes ago. The time unit is minutes.#查找10分钟之前30分钟之内访问过的文件或目录Find/

Shell Script (iv)

Shell Script (iv)(7) TR command#实现字符转换功能#-c string: Inverse string character set, that is, all character sets except for the string#-d string: Delete all occurrences of characters in string#-s: Deletes all occurrences of a sequence of characters,

Bash Shell usage notes

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 

Linux Shell Learning Notes (i)

The shell, known as a program that acts as an interface between the user and the Linux OS, allows the user to enter commands that need to be executed to the OS. There are a lot of shells here, just bash.  0) Shell version of the experimentShow Shell

Shell numerical calculation

In the shell, especially in the shell loop, some expressions may be used to operateThis requirement can be accomplished using the expr command, such as:x=$ (expr $a + 1)Completed the calculation of the sum of $ A and 1 and assigned the value to

Shell script deletes the specified mobileprovision

For some reason, Xcode has helped me follow the thousands of development and on-line certificates that need to be removed from this part of the certificate:  #dir="/users/ethan/library/mobiledevice/provisioning

Shell common Text Processing commands

grepIf you want to use a regular expression, add the parameter Grep-e "[a-z]+" #使用正则表达式or egrep "[a-z]+"-a-b output matches a few lines before or after the line-C to display a few lines at the same time-e matches multiple styles, such as GREP-E "cat"

Linux under the shell to get the native IP address

Method Two/sbin/ifconfig-a|grep inet|grep-v 127.0.0.1|grep-v Inet6|awk ' {print $} ' |tr-d ' addr: 'Method OneGet the native IP address and save it in a variablearg=ifconfig eth0 |grep "inet addr"| cut -f 2 -d ":"|cut -f 1 -d " " Ipaddr= a

Defining and accessing arrays with the shell

Defining arraysArr= (1 2 3 4 5)accessing arrays# echo ${arr[0]}1Print all the values in an array# echo ${arr[*]}1 2 3) 4 5Print array length# echo ${#arr [*]}5The above defined array, the index can only be a number, the following will describe the

Total Pages: 541 1 .... 380 381 382 383 384 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.