Use of arrays$array _var= (1 2 3)--use parentheses to define an array with a column value$echo ${array_var[0]}--The first element of an array$array _var[0]= "Zero"--defines an array using the form of an index and a value$echo ${array_var[@]}--Print
Shell scripting, there are three kinds of control structure are: sequential structure, conditional judgment structure, loop structure. This article summarizes the use of conditional judgment constructs in shell scripts.The structure of conditional
Shell scripts can also receive script parameters, like commands and applications, as they are executed .An application example:VI addhead.sh:Suaddhead ns=591 $Perform:./addhead.sh Rtm_step10_lap.dat rtm_step10_lap.su (where rtm_step10_lap.dat is
For Java,python, you can use the import method to make calls between scripts or modules, for example:>>> Import math>>> math.sqrt (4) 2.0how to invoke other shell scripts in the shell. Or a variable in another script, what about the function?method
(1) rsync (remote synchronize) is a data synchronization tool that allows you to quickly sync files between multiple hosts via Lan/wan, or use rsync to synchronize different directories on your local hard drive. (2) Rsync is a tool for replacing
Because some registered user account rules can follow, and usually people's awareness of the poor, the password is relatively simple, the user name of the common password login test, to break the password.For learning purposes only, do not use for
Shell Foundation-environment variable configuration fileSource configuration file or. Configuration file:After the environment variable is written to the configuration file, the user needs to re-login to take effect, but with the source command, it
One: Linux shell string interception and splicingSuppose there is a variable var=http://www.linuxidc.com/123.htm 1 # Intercept, delete the left character, and leave the right character. Echo ${var#*//}where Var is the variable name and the # is an
FunctionFunctions have the same functionality:Simply put, the function of the program is to call the same part of the code in a number of parts, and then a name, so the function is called the name can be, in the modification of the code, only need
First, what is the landing shell? What is a non-landing shell?1. Landing shell means:(1) When the user logs on, enter the user name and password to start the shell;(2) through the command with the--login parameter: The shell launched by Bash--login.2
Shell Working principleWhat is a shell?The shell is a general term for command Language, command interpreter and programming language, which is an interface between the user and the Linux kernel, and provides the user with an interface to use the
The shell is also called the command line interface, which is the interface between the user and the computer under the *nix operating system. The word shell refers to the program in the operating system that provides access to the kernel
One: the Dead cycleSyntax 1:While True;doLoop bodyIf Condition;thenBreakFiDoneSyntax 2:until False;doLoop bodyIf Condition;thenBreakFiDoneis to keep looping until a certain condition comes to an end .Cases:See if a user with "Gentoo" on the current
-----------------------------------------------------------------------------------------Only the environment variables are placed in the configuration file to automatically take effect each time the power-on. SOURCE command: Let the configuration
Use df-tph to view hard disk usage under Linux:sdua:/# Df-tphfilesystem Type Size used Avail use% mounted On/dev/vda3 ext3 2.0G 974M 940M 51%/udev tmpfs 16G 500K 16G
/path/to/scriptname opt1 opt2 opt3 opt4 $0 $1 $2 $3 $4Is that clear enough for you? Run the script file named "$" variable, the first parameter is $ ~ ~ So, as long as we use in script, we can easily release some
Ubuntu12.04 TLS 64bit, bash 4.2.25First, the definitionAn array is a collection of some data, divided into two types(1) ordinary arrays, only integers can be used as indexes(2) Associative array , can use string as index, Bash 4.0 start support,
Objective This blog is based on the blog of the Brothers, the blog address click on it can go in, there are many good blog, my sorting algorithm is from this; some of the concepts of data architecture I will not elaborate on, Wu fan's blog is
1, SETP1Turn on the NTP protocol and modify the time zone:/system NTP Client set Enabled=yes server-dns-names=1.centos.pool.ntp.org/system clock set time-zone-name=asia/ ShanghaiDetects if the route communicates with the dynamic Domain name
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.