For loopFor variable name in list;Loop bodyDoneImplementation mechanism:Assigns the element in the list to the "variable name" in turn; The loop body is executed once each assignment; Until the elements in the list are exhausted, the loop endsList
EnvlEval will scan two times for subsequent commands, execute this command if the command is a normal command after the first scan, and if the command contains an indirect reference to the variable, the semantics of the indirect reference is
Condition Test--test or [The command "test" or "[" can test whether a condition is true, if the test result is real, then the exit code of the command is 0, if the test result is false, then the exit code of the command is 1.650) this.width=650;
One, bash variables:Variable naming laws:1. The reserved words in the program cannot be made: for example if, for;2, only use numbers, letters and underscores, and cannot start with a number3. See the meaning of the name4, the Uniform naming rule:
Shell script ProgrammingThe history of programming languages: Machine language--Assembly languages--high-level languagesCategories of programming languages:(1) According to the operating modeStatic language: Compiled language, pre-converted to
Eleven. AWK Programming:1. Variables:The awk variable is defined when it is assigned.The type of the variable can be a number, a string.The value of the uninitialized variable is 0 or the blank string "",List of assignment symbols for variables=+=-=*
String interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.aaa.com/123.htm.1. # Intercept, delete the left character, leave the right character.echo ${var#*//}where Var is the variable name and the # is
The Shell function is to explain the execution of the user's command, the user enters a command, the shell explains the execution of this article, this method is called interactive, but there is another way to execute the command is called batch
Using Shell operations for a binary conversionAssuming there are some numbers in your script, you need to process those numbers in a different binary. This type of conversion can be implemented easily and automatically using Shell operations. One
Find command options-name Search by file name-type find a type of file (b for device block; d directory; C character device file; L sign (soft) link file; F normal file)-size find file length or size-prune exclude current folder when locating files,
Code inside the monitoring 1 processes, the code is very simple, I do not explain, there is not understand, you can ask in reply.I saw it and gave it a lecture.Of course, the script to execute, you need to turn on the system's timer process Crond,
To implement Zabbix LLD monitoring, you typically need two scripts, a custom discovery check script, and output in JSON format, and the other is the script to get the valus of the monitoring item.The custom discovery checks script output results in
File test:-e file: Test files exist-F File: Test files are normal files-D File: Tests whether the specified path is a path-R File: Tests whether the current user has read access to the specified file-W File: Tests whether the current user has write
There are two types of Linux users in the world: adventurous and cautious.One type of user is always instinctively trying any new choice that can poke its pain points. They have tried countless window managers, system distributions, and almost all
Background: defines a function that is different than the number of local and online server clusters, and wants to get the number of distinct clusters. The function return value of the shell and other languages is quite different. Define a
/bin binary Executable command/sbin System Management commands, which are stored in the hypervisor used by the system administrator/usr/bin a multitude of applications/usr/sbin Some management programs for super users$city = $argv [1];$list = ['
Array, arraysVariable: Stores the memory space of a single element;Array: Memory space for storing multiple elements;Array name: The entire array has only one name;Array index: numbering starting from 0;Array name
Defining arraysIn the shell, the array is represented by parentheses, and the elements of the array are separated by a "space" symbol. The general form of the definition array is:Array_name= (value1 ... valuen)For example:Array_name= (value0 value1
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