First, the meaning of the ADBthe full English name of ADB is Android Debug Bridge, which is Android debugging bridges; theadb executable is stored in the Android SDK, so you will need to download and install the Android SDK tool with the ADB command,
I. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.1. function formatfunction f_name() { command}The
Script[[email protected] shell]# vim for1.sh#!/bin/bashfor i in `seq 1 6`do echo $idoneExecution results[[email protected] shell]# sh for1.sh123456Script[[email protected] shell]# vim for2.sh#!/bin/bashsum=0for i in `seq 1 6`do echo "$sum
Case Base Syntax:Format case?? Variable name invalue1)Command;;value2)Command;;*)Commond;;EsacIn a case program, you can use the |, meaning, or means of a condition, such as???2|3)Command;;Script[[email protected] shell]# vim case.sh #!/bin/bashread
One, for loopThe For loop structure is a very frequent loop structure used in daily operation and maintenance work.1. For loop specific format:for 变量名 in 循环条件; do commanddoneThe "loop condition" here can be a set of strings with numbers
# # #10个实战及面试常用的shell脚本
Some considerations before writing the script
1. Start with interpreter: #!/bin/bash pre>
2. Syntax indentation, using 4 spaces, more attention to the description
3. Naming rules:
What is Shellshell?
Shell is a scripting languagecan use logical judgment, circular judgment and other statements;functions can be customized;A shell is a collection of system commands, such as a batch command of Windows;Shell script can
The case selection statement in the shell script can be combined with the read instruction to achieve a good interactive response operation, case receives one or more parameters passed in by the read instruction, and then the case is selected
Cat Head Tail grep Sed awk Cut WC Sort Uniq TR TAC Rev Cat, Concatinate, connects the contents of one or more files sequentially, outputting them to the standard output.Cat 12.pub Cat-n 12.pub Cat-a file # Merging filesCat 12.pub 13.pub 14.pub
Mans Bash1. How the Shell works (1)Kernel Shell UsersParent Process Fork---waitChild process Exec--exitRelated Man documents:Fork (2)Clone (2)Execve (2)Exit_group (2)EXIT4 (2)Strace (1)-->strace-e2. Shell Syntax (2)1. Simple command (kw:simple
VariableA variable is a named memory spaceAll variables in the shell are treated as character variables by default, and bash does not support floating-point variablesNaming rules for variables:You cannot make a reserved word in a program: for
1. ExercisesWrite a script that calculates the size of all processes in the Linux system and2. Exercise Analysis 2.1. First question, where to collect data for a processUse top or PS to get the memory usage size of each process. Once the size is
Recently, I was going to review the shell, just to see the shell operation, and to write a simple 99 multiplication table like a beginner. It is suggested that you can run shell scripts directly in
1.FOR Loop structure 1.1 for loop structure syntaxGrammar:For variable name in variable Value listDoInstructions...DoneTip: In this structure, "in variable Value list" can be omitted, when omitted is equivalent to in "[email protected]", using for I
An environment variable 1 overviewThe bash shell uses a feature called environment variables to store information about the shell session and the work environment, which also allows false data to be stored in memory so that the shell can run
The issue cannot be removed after using HBase shell entry in Xshell:In the HBase shell, the wrong input instructions can not be deleted using backspace and delete, the use of the people know that this is a lot of pits, there is much distress!OK,
1. Why use a functionLook at the role of aliases first[[email protected] ~]# alias httpd=‘/etc/init.d/httpd‘[[email protected] ~]# httpd start正在启动 httpd: [确定]function is to call the program multiple times the same code part is defined as a copy
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.