Use this command to start activity, services, send broadcast, etc. from the cmd console:C:\USERS\ADMINISTRATOR>ADB Shell AM usage:am [subcommand] [options]Start an activity:am start [-d] [-W] -d:enable debugging-w: Wait for launch to
idea, produce a random array, and then press the elements of the array to re-output the rows in the file 1, the generation of random array reading when it feels very simple. The first time with a little bit. The first is the definition,
#!/bin/bash while ifs=: Read name1 name2 name3 name4 #IFS是从文件读取内容时指定的分割符号, assign the contents of a to the corresponding variable in separate sections. Do echo $name 1 ' | ' $name 2 ' | ' $name 3 ' | ' $name 4 done Linux commands (use of the
1. Shell Features:To view the command history using the historical command:[Email protected] ~]# historythe user's history record is located in the user's home directory . Bash_history File:[Email protected] ~]# vim ~/.bash_history Quick Actions
Today, a colleague is writing a database backup shell script, in the case of several times to determine the script code is correct, found that the results of the script output is not normal./* * * @author Jenkihuang * @email [email protected] *
How to assign the return value of a shell command to an application's variable.Bo Master recently made a router project, need to get the router now network status and parameters, using the UCI get GET,However, with system ("UCI get"), the obtained
As a small scripting language, LUA functions can be run and debugged using shell commands, and here are a few common shell commands. Basic format is LUA [option parameter] [script parameter](1)%lua program name. LUA--run the LUA program
1. Give a file with IP , one IP line, to count which IP has the most occurrences. Ip_input.txt content is as follows:219.217.49.14175.43.4.8787.48.98.159.73.38.25219.217.50.1459.92.48.32219.217.49.1459.72.38.14259.73.38.25219.217.49.14The following
#read Onefile Line by line forLineinch$(Cattest1.txt); Do Echo$line; Done;# whileReadSplitLine by Space whileRead Line Do forWordinch$line Do Echo$word Done; Donetest1.txt#string Splitor substring input=type=ABCDEFGEcho$input, #get
Today, write an incremental backup system file using shell scripts, and review the shell script related commands, which can be used to back up different files or folders for full backups and incremental backups, depending on your needs. Directly on
Recently the leader has given a task to deal with the line-piece server, unwanted pictures to remove it.Idea: First the line to use the image from the database to export, the table has a picture path, and then the path to generate a txtFinally, each
Login Shell and Non-login Shell:Login Shell: When you get the shell, you need a full login process. such as: Tty1~tty6 login, you need to enter a user name and password. The shell you get at this point is called loginShellNon-login Shell: When you
We communicate the commands we enter with the kernel through the shell so that the kernel can control the hardware to work correctlyBash is our default shell for LinuxUser interface (Shell,application)--------core (Kernel)-------hardware
When we need to find a specified file in thousands of files, we may be able to use LS filename. The results will list some information about this file. But this is not the best way. Or specify the rules of the file, LS obviously can not meet our
#!/bin/shsum (){echo $ (($1+$2))return $ (($1-$2))}Sum $c=$ (sum $)echo $?Echo $cExecute command:./bashtest 1The operating result is:12--sum Results10--echo $? result because the value of return is ten12--echo $c result, the value is 12, so C will
The Find command, like a CD, is often used. But perhaps most of the time as long as the one or two parameters are enough to use. Or, it's a little too much. But when we take the initiative to look at the handbook of Find, we will find that the
Shell script sorting (Bubble Sorting)
#/Bin/basha = (9 84 51 0 345 1 2 34 1 0) # define an array temp = for (I = 0; I
The above is sorted by a custom fixed array, and the following is a user-defined input array.
#/Bin/basha = 'expr $ # + 1' #
Use of shell (1) variables in Linux, linuxshell
One Variable
Echo $ a: output variable a. If it does not exist, a variable a is created.
Unset a: Cancel variable
1.1 environment variables:
Env: View descriptions of environment variables and common
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