After Android 4.2, because the ADB control, unified use of persist.sys.usb.config to control, so the corresponding set point also changed to frameworks/base/service/...../usb/ Usbdevicemanager.java, you can also see similar code such as:Public
Type of Shell:1. Log-in ShellLog in normally via a terminalSu-Su-l2. Non-login shellSuCommand window open under graphical terminalShell scripts that are executed automaticallyBash's configuration file1. Global
Requirement-driven Linux Shell Programming
Requirement-driven Linux Shell programmingtable of Contents
1. Where can I find the basic Material about Linux Shell programming?
2. How to time a function/program (Get the execution time of a
1. Specify the script interpreter at the beginning
#! /Bin/sh or #! /Bin/bash
2. Provide the function description, author, version, and other information at the beginning
# Description: # Author: # contact: # Last edited: # version:
Note: you
TR is used to delete control characters in a file or convert characters.Syntax: TR [-C/D/S/T] [set1] [set2]Set1: Character Set 1Set2: Character Set 2
-C: complement. Use set2 to replace characters not included in set1.
-D: delete all characters in
[email protected]:~$ cat b.sh#!/bin/bashdir=`pwd`dir=$dir‘/‘for f in `ls *.png`do echo $dir$fdone
Check the execution of each line of code:
[email protected]:~$ bash -x b.sh++ pwd+ dir=/home/wade+ dir=/home/wade/++ ls chrome_1407299385726.png
The raw data is in the final baiang.txt file.
Shell command:
Cat ‑qiang.txt | grep-P "^ country | ^ ☆" | awk-F" "'{print substr ($2, 1, 2 );} '| sort | uniq-c | sort-NR
The result is as follows:
27 Jiangsu22. Shandong Province18 Zhejiang10 Liaoning7
Labels: Bash internal and external commands
What is an internal command? What is an external command?Internal commands: commands provided by the shell programExternal command: executable program in a path inside the system.
The search for
Option name
Format
Description
-Ls
-Ls
View the current directory structure of the specified path
-LSR
-LSR
Recursively view the directory structure of a specified path
-Du
-Du
Measure the file
--- Content from http://www.jb51.net/article/31232.htm
By default, values assignment and operations in shell are processed by strings,1. Example of an error methodA)Var = 1 + 1Echo $ VaRThe output result is 1 + 1. Tragedy.B)Var = 1Var = $ var +
Part 1 simple common commands
1. Date command
2. Display calendar Cal
3. display the current directory pwd
4. Switch the current working directory
By default, the main directory of a Super User is/root, while that of a common user is the same
BASH Shell has an extglob option. After the shell is enabled, five pattern matching operators can be identified to facilitate file matching.
Method:
Run shopt command: shopt-s extglob
Close method: shopt-u extglob
When this feature is enabled,
Shell text filtering (awk) classification: Linux Shell script learning 1241 people read comments (0) Add to favorites report shell Regular Expression script task Language
If you want to format packets or extract data packets from a large text file,
Shell text filtering (Regular Expression) classification: Linux Shell script learning 213 people read comments (0) collect reports
When extracting or filtering text from a file or command output, you can use a regular expression (r e), which is a
In the shell command terminal, Ctrl + n is equivalent to the downward direction key, and Ctrl + p is equivalent to the upward direction key.
You can use them or the arrow keys in the Command terminal to quickly find historical commands. This is
This small program is simple, but it is the first shell script written by the novice. It has many factors to consider, but some errors are not handled ,,
#! /Bin/bash# Auth: dhh
Clear
Addr =/etc/yum. repos. d
Mkdir $ addr/bf>/dev/null 2> & 1
Mv $
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