Shell is a command interpreter. It is an insulation layer between the operating system kernel and the user. To be precise, it is alsoA powerful computer language. A shellProgramIt is called a script and is a very easy-to-use tool.Combine system
Shell script debugging-run log 1
This article mainly describes how to output debug logs in shell scripts.
C/C ++ debug log
In C/C ++, _ file __, _ FUNC __, _ line _ indicates which log of the current row comes fromSource codeWhich
Sed
Reads a row of data, matches the edited command, modifies the data, and then outputs itOutput
Basic Format
Sed options script file
-EExecute multiple commands
-FSpecifies the command file, where the command does not need to";"Split
◆ Parameter description-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory
This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific JPG type, sometimes it
The Common commands of ADB shell in Android and the methods for viewing application database information under cmd are as follows:
CMD -- ADB shell: Enter the shell command interface of the simulator.
Ls displays all the file directories in the
This blog (Http://blog.csdn.net/livelylittlefish) Post the notes prepared by the author (, Xiaoyu) on the relevant research and study content. You are welcome to correct them!
Hide cmd command line running using wscript. Shell object
1. wscript.
1)
Create
FunctionName {
...
}
Or:
Name (){
...
}
2)
Call
Use the function name directly. The function can be called only after it is defined;
When a function has the same name, the new definition will overwrite the old definition and no
Ls
-L, show the hard link count;
-I, show I-node
-H, human readable
-T, sort by modify time
-S, sort by size
-R, -- reverse
-R, show content of sub-Dir
-V, sort by version
CP
-P,Retain source file attributes, such as the modification time
-L,
Shell basics 5: Input and Output (echo, read, Cat, pipeline, Tee, redirection, etc)
All the environments below are tested in RedHat Linux9In Linux, to make the Escape Character take effect, you need to add the parameter-eStart with the echo
A simple example:
#!/bin/bashecho "What's your favourite star?"select var in "Leehom" "Vae" "Jay" "Jolin"; dobreak;doneecho "You have selected $var"
Running result:
root@ubuntu:~# ./star.shWhat's your favourite star?1) Leehom2) Vae3) Jay4) Jolin#
Bash is used for shell programming. Bash is free and easy to use. Bash-Bourne again shell
File named myshell. Sh
Before executing a file, you must first obtain the following permissions:
Chomod 777 myshell. Sh
1. display file
Let's take a look at an example:
#!/bin/basharea2=(zero one two three four)echo "Origin is :"echo ${area2[0]} ${area2[1]} ${area2[2]} ${area2[3]} ${area2[4]}area2[1]=1area2[4]=4echo "After is :"echo ${area2[0]} ${area2[1]} ${area2[2]} ${area2[3]} ${
I. Shell Condition Statement (if usage)
If statement structure [if/then/Elif/else/FI]
If condition test statement
Then
Action
[Elif Condition
Action
Else
Action
]
Fi
If you are not clear about the conditional test statement, refer
Check/set system services
chkconfig Display Process dynamics
Top. Common performance analysis tools in inux can display the resource usage of various processes in the system in real time, similar to the Windows Task Manager.
Detailed explanation
Import flash. display. Sprite;Import flash. display. stage;Import flash. Events. event;Import flash. Geom. Point; Import zujian. tank; Public class paodan extends Sprite{Private var ball: ball;Private var point: Point = new point ();Private var DX:
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.