VariableA variable is a named memory spaceAll variables in the shell are treated as character variables by default, and bash does not support floating-point variablesNaming rules for variables:You cannot make a reserved word in a program: for
Recently around here for a long time ah, now reluctantly come out, share a little understanding of their ownExit statusA program once run must have only two kinds of results, either success or failure, the result of success is the same, the reason
Grammar Test EXPRESSION[EXPRESSION][[EXPRESSION]]1. Numerical test-eq is equalWhether the-ne is unequal-GT is greater than-ge greater than or equal to-lt is less than-le less than or equal to2. String test= = is equal to! = Does not range> is
An aggregate function evaluates a set of values and returns a single value. In addition to the count (number of statistics) function, the other aggregate functions ignore null values (NULL) in the formula. All aggregate functions are deterministic
Pstree-p #显示进程编号 (tree) echo $$ basic structure of #显示当前shell进程编号 scripts: #! Shebang (indicates what shell is used to open a file, typically using bash) configuration_variables #定义变量FUNCTION_DEFINITIONS # define function Main_code #主要执行命令
Scripting: Stacking of commandsThe first line of any script:#!/bin/bash: The Interpreter pathIn addition to the previous # number as a commentExecute permission before script execution: chmod +x file nameCondition Judgment in bash:Condition Test
Conditional test expression:[Expression][[Expression]]Test expressionInteger test:-EQ: Tests whether two integers are equal.-ne: Tests whether two integers are not equal.-GT: Tests whether one number is greater than the other.-LT: Tests whether a
Text replacement in Vim: 1. Replace the contents of the current line: :s/from/to/ (S is substitude) : s/from/to/ & nbsp : replaces the first from in the current row with the to. If the current line contains multiple
Linux Nineth Day: (August 11) Linux shell script programmingA shell script is a text file that contains some commands or declarations and conforms to a certain formatFormat requirements Run shebang mechanism#!/bin/bashBash-n syntax errors in/path/to/
Awk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. To put it simply, awk reads the file line-by-row, using spaces as the default
If condition test Type: File test, digital test, string testIf statement structure:
If ...; Then ...; Fi
If ...; Then ...; else ...; Fi
Conditional test expression:
[Expression]
There are three types of conditions that are commonly tested in bashConditional test expression: [expression] [[expression]]First: Integer test:-eq tests whether two integers are equal, such as [$A-eq $B]-ne test two integers in different sizes-GT
Condition test:To determine whether a demand is satisfied, it needs to be realized by testing mechanism;How to write a test expression to implement the required tests:(1) Execute the command, and use the command status return value to judge;$?:
The shell is a scripting language provided by Linux that can perform some programming operations. Essentially, the shell is just a command interpreter, and a shell script is a stack of commands and some simple logic to judge.So the most important
This article mainly introduces the detailed interpretation of Ruby in terms of conditional judgment statements, if, else and other logical judgments are the basis of the programming language, the need for friends can refer to the
Ruby offers a
Http://man.linuxde.net/testHttp://blog.chinaunix.net/uid-24780853-id-2578709.html[email protected] ~]# man testtest (1) User Commands Test (1) NAME test - Check file types and compare Valuessynopsis Test EXPRESSION t EST [EXPRESSION] []
-------Android Training, Java training, look forward to communicating with you! ----------The judgment structure of if/else Constitutionif (conditional expression) { expression 1;}Else{ expression 2;}This means that if the conditional
Summary of knowledge points in this chapterData type: 1. Basic data typesNumeric typeInteger typeByte (128~127), accounting for 1 bytes of storage roomShort ( -2^15~2^15-1), accounting for 2 bytesInt (default type -2^31~2^31-1, approx. 2.1 billion),
Let's say python can simply handle +-/, parentheses cannot be processed. Practice processing. Practice the regular.Some of the internet does not handle the negative sign well, as follows. Temporary unhandled parentheses missing between numbersand
7 expressionsThe precedence and binding of operators are clearly defined, except in a few cases, that the order of evaluation of an expression is not superfluous, and even some sub-expressions with side effects are not first, that is, unless the
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.