The meaning of shell variable $#,$@,$0,$1,$2 in Linux is explained:
Variable Description:
$$
The shell itself PID (ProcessID)
$!
The PID of the Shell's last running background process
$?
End code of the last command to run (return value)
$-
Flag list using the SET command
$*
A list of all parameters. Output all parameters in the form of "$ $n", as in the case of "$*" with "".
$@
A list of all parameters. su
not good, then you can try this link in the method: http://download.csdn.net/detail/threedonkey/4228886
The following is an example in the book.
/* Display the content in the camera */# include
//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////
/*
, the number of elements stored in each dimension). For example:For int A [5] [4], (* P) [4], P =; then a [3] [2] = P [3] [2] = * (p [3] + 2) = * (p + 3) + 2) => * (p) + 3 × 4 + 2) = * (* P + 3 × 4 + 2)/P is a pointer to a two-dim
2-0. Integer four Arithmetic (10), 2-0 integer four arithmetic 10
This topic requires programming to calculate the sum, difference, product, and Quotient of two positive integers and output them. Ensure that all input and output are in the Integer Range.
Input Format:
Input two integers A and B in A row.
Output Format:
Javascript tips: 0---2 and 0---2
Okay. Pretty girls have read it. Let's continue with the content of the last lecture (the content of the previous section)Control statement:
First, I would like to sum up a total9Control statements:
If statement
Do-while statement
While statement
For statement
For-in statement
PHP backtracking solves the problem of 0-1 backpacks. PHP backtracking to solve the 0-1 backpack problem example analysis this article mainly introduces the PHP backtracking method to solve the 0-1 backpack problem, the example analyzes the php backtracking method to solve t
Preface
In Linux, all devices are regarded as files. Each time a file is opened, there is a file descriptor that represents the file to be opened. When the program starts, three I/O device files are opened by default: stdin, stdout, and stderr. The file descriptors 0, 1, and 2 are obtained respectively.
Instance
Now let's look at an example of testing the ttyname
connection from the client.
Disconnection, including active disconnection (close or shutdown) and passive disconnection (read returns 0 ).
The message arrives and the file descriptor is readable. This is the most important event. The processing method determines the network programming style (blocking or non-blocking, how to handle subcontracting, and how to design the buffer at the application layer ).
After the message is sent, this is hal
Always think that int A [256] = {0}; Is to initialize all elements of a to 0, int A [256] = {1 }; is to initialize all elements of a to 1. when debugging, I found that the memory was not the same thing. I flipped through the C ++ programming language and finally made a conclusion. If the PDF file is not copied, it will be translated in this chapter. The following 5.2.1 array initialization array can be init
Learn about the basics of Android from 0 (2)-Explanation of the AndroidMainfest. xml fileAndroidMainfest. xml file details
1. About AndroidManifest. xml
AndroidManifest. xml is a required file in every android program. It is located in the root directory of the entire project, describing components exposed in the package (activities, services, and so on), their respective implementation classes, various dat
IOS9-by-Tutorials-Study Notes 1: Swift-2-0IOS9-by-Tutorials-Study Notes 1: Swift-2-0
Apple opened up Swift some time ago and made a stir in the iOS development field. He gave a look at Swift's development roadmap and planned to release Swift 3.0 next autumn. Apple is now more developing on Swift, encouraging communities to contribute code, and accepting some feed
Endpoint 0 is the best way to test the driver, I will later put the Linux driver experience, this buddy wrote how to send data: http://www.lcsky.org/2.0/node/43
Control transmission is useful when a small amount of control information is exchanged, such as sending commands and obtaining the status of the lower computer. It is convenient to use control transmission through the cypress standard firmware framework, you only need to add your own processi
angle x to radiansTrigonometric functionMath.sin (x) returns the sine of x (x is radians)Math.Cos (x) returns the cosine of x (radians x)Math.tan (x) returns the tangent of x (x is radians)Math.asin (x) returns the inverse sine of x (the return value is radians)Math.acos (x) returns the inverse cosine of x (the return value is radians)Math.atan (x) returns the inverse tangent of x (the return value is radians)Time ModuleThis module provides time-dependent functions and is always availableTime p
In the previous section, the flowchart we drew, remember? Judging the part we will, the difference cycle, below I will introduce three kinds of commonly used loops.Loop structure while loop (when looping, at least my C language teacher calls it)Let's introduce the syntax, as follows while (conditional expression) { // Here is the loop body, when the above condition expression is true, the loop body is executed, otherwise exits }While followed by a conditional expression, the loop is executed
) >0, that is, the same symbol;x1=x0; →x1 the x0 assignment, the interval for the next continuation of the loop operation is x0 (x1)-x2else//Otherwise, if f (x0) *f (x1) x2=x0; →x2 the x0 assignment, the interval for the next continuation of the loop operation is x1-x0 (x2)}while (Fabs (f (x0)) >=1e-6);//When the type of cyclic judging conditions, 1e-6 is the value of precision, f (x0) close to 0, that is,
Problemconsider a function which, for a given whole number N, returns the number of ones required when writing out all numbers between 0 and N. for example, F (13) = 6. notice that F (1) = 1. what is the next largest N such that F (n) = n? Algorithm idea: calculate the number of 1 in each number cyclically. If F (n) = N is satisfied, exit. Otherwise, continue. The Code is as follows:
/**//******************
:./variableFirst:aaSecond:bbARGUME:AA BBBy displaying the results you can see:$# is the number of arguments passed to the scriptThe name of the script itself$ $ is the first parameter passed to the shell script$ $ is the second parameter passed to the shell script[Email protected] is a list of all parameters passed to the scriptLocation parameters in Bash Shell $#,$*,[email protected],$0,$1,$2 ... and the m
think the former effect is closer to the example, but this is certainly not the way to add CSS to the problem caused by different. In order to write this summary open double screen, unexpectedly found that the previous copy of the window size compatibility better, the latter part of the form has been completely deformed. This question is mentioned in "Mastering CSS," and if there is time, I will summarize how to make the Web page compatible with the
Excerpt from: Abs_guide: http://www.tldp.org/LDP/abs/abs-guide.pdf
the meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$the PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?end code of the last Run command (return value)$-flag at a glance using the SET command$*all parameter lists.such as "$*" in the Cas
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.