The AM PM command in the ADB shell, some of its own insights and translations for most official websites.First, the AM command, am full activity Manager, you can use AM to simulate the behavior of various systems, such as to start an activity, force
pipelines are implemented " The previous standard output is used as the following standard input "Xargs is to achieve " to use standard input as a parameter to a command "Contrast:Ind/sbin-perm +700 |ls-lFind/sbin-perm +700 |xargs ls-lParameters and
4.1.3 Shell Process Control Statements If condition judgment StatementIf ( expression ) #if (Variable in Array)Statement 1ElseStatement 2FiCase one, test if the directory exists, does not exist then new (note that space must be between the brackets)
Declare declaring variable type declare [+/-] [option] Variable name-: Set the type attribute to the variable +: cancels the Type property of the variable-A: Declaring variables as arrays-I: declaring variables as integers-x: Declaring a variable as
Shell script to generate test dataVim data_create.shRm-rf./data.txtTouch Data.txtFor ((i=0;iDoStr= ', name ';Name=${i}${str}${i}#echo $nameecho $name >> data.txtDoneecho ' Show TestData 'More Data.txtchmod u+x data_create.shRun the scriptSh-x
"Topic link" http://acm.hdu.edu.cn/showproblem.php?pid=5730"The main topic"Give An array w, representing the weights of the fields of different lengths, such as W[3]=5, if the field length is 3, then its weight is 5, and now there is a field of
Recently saw the shell script. The shell script has been used many times in a lot of ready-made kits. In short, the effect of this thing is to integrate a series of operations.• Integration makes a set of work more modular and standardized.• Batch
Integer operations in shell scripts are generally implemented by the two instructions of let and expr, such as the variable s plus 1 can be written: let "s = $s + 1" or s= ' expr $s + 1 'The two are not easy to write, but the performance of the
I. Introduction to the DATE commandFunction: Used to display time, this command is used much in the shell scriptFormat: Date + parameter + formatParameter:-D to display the specified timeDate Show current time April 13, 2016 Wed 14:33:55
1. The most straightforward and straightforward judgmentWithout those if statements, directly shorten the amount of code.2. The variable is caused by "" quotation marksAs shown below:, you can get the result is NULL.#!/bin/sh a= if [!-n "$a"];
Variable Description:$$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
Generating random numbers in Linux can use the $random variable.The Man Bash command looks at the explanation of the random.Random each of the parameter is referenced, a random integer between 0 and 32767 is generated.As you can see, the $RANDOM
One, DF (File System view command) [[email protected] ~]# DF [option] [Mount point] option:- A displays all file system information, including special file systems such as/proc,/sysfs-H , using the customary unit display capacity, such as KB, MB or
1) Use of shell ifDetermine if a.txt existsIf [-F a.txt]2) Execution result of the commandAssign the execution result of the command to the variable, the following two methods are the sametime=$ (date +%y%m) time= ' date + $Y%m '3) Find out what we
Write a script:1. Prompt user to enter a user name2, display a menu to the user. Shaped likeU|u Show UIDG|g Show GIDS|s Show SHELLQ|q quit3. Remind the user to select an option and display the Selection of contentIf the user gives an incorrect
Cal Command: Date display
Cat/proc/meminfo: Memory usage Query
Free command: Memory detail Query
Arch command: CPU architecture displayDisplays the architecture of the current system, for example:#archx86_64
CAT/PROC/CPUINFO:CPU
Shell scripts that perform fast and easy to understand code. In the process of writing shell code, it is often used to read the file contents. Notation One:----------------------------------------------------------------------------#!/bin/bash while
SSH is the abbreviation for secure Shell, which is developed by the IETF Network Working Group, andSSH is a security protocol based on the application layer . SSH is currently a more reliable protocol that provides security for Telnet sessions and
Task 1. Paper Shell (box.pas/box.c/box.cpp)"Title description"MCX is a child with a mild cleanliness. One day, when he was addicted to the math paper difficult to extricate themselves, vaguely think of their own learning probability of the time to
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.