RecommendedArticle:
APIS for file path operations in Shell
Http://www.cnblogs.com/fangkm/archive/2009/04/15/1436674.html
I wanted to sort it out by myself, but I found the above article by Google according to the title of the phenomenon, and I
You can change the shell in three ways:
1. Change the default shell for all later logon sessions
Enter the command CHSH-L to view the available shell and its path of the current system.
After entering CHSH, the system prompts you to enter the
The source command can load another script in one script. The following is an example:
First, we define a function script named myfunc. Sh, as follows:
#! /Bin/bashFunction Square{Local tempLet temp = $1*$1The sum of squares of Echo "$1 is: $ Temp"
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
Compare shell strings and determine whether the string is a numberBinary comparison operator, which compares variables or numbers. Note the difference between numbers and strings.
◆ Integer comparison
-EQ equals to, for example, if ["$ A"-EQ "$
Tangent to Vertex
Returns a convex polygon.P, TangentLIsPIntersection andPInternalL.
This concept is similar to orthogonal tangent.
Pair of vertex points
If two verticesPAndQ(BelongP) In the two parallel tangent lines, they form a pair of
A simple shell Backdoor
Author: Pony/smallhorse [e.s. t VIP] (it doesn't matter if you do not write this e.s. t VIP)Source: evil baboons China
Recently, I was bored and thought about writing a simple shell backdoor. At the same time, anti-virus
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 set1
The daily log analysis team is really sorry. We often need to provide statistics such as PV, UV, and independent IP addresses. C/C ++ and Java can all be used to write logs. The process is like this, first, read the file, scan it row by row, put the
Do you still remember the regular expression that used to calculate prime numbers? The world of programming is so interesting that you will always be able to see something special. Have you ever thought that you can put your variables and functions
2011-04-23 wcdj
The method for learning shell program design is: Hands-on + man command
The following scripts are all tested in cygwin.$/Bin/Bash -- versionGNU bash, version 2.05b.0 (1)-release (i686-pc-cygwin)Copyright (c) 2002 Free Software
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
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
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
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