[TOC]V. Automatic synchronization of files 5.1 configuration scriptsThe core command is to use the Rsync service.[[email protected] sbin]# vim 4.expect#!/usr/bin/expectset passwd "123456"spawn rsync -av [email protected]:/tmp/12.txt /tmp/expect
[TOC]Distribution System-expect What is a distribution system?
Now some of the larger enterprises, most of the use of load balancing, and sometimes because some programs to change, or some bug to modify, if only a few servers, it is very
1, terminal (termimal) = TTY (teletypewriter, fax printer), the role is to provide a command of the input and output environment, under Linux using a combination of keys ctrl+alt+t Open is the terminal, you can think terminal and TTY is synonymous;2,
Directory:I. While loop and until loopTwo. Loop control statement continue break shiftThree. Special usageI. While loop and until loop
1.while CycleWhile CONDITION; DoLoop bodyDoneCONDITION: cyclic control condition; Before entering the loop,
Recently a new deployment of the gateway, the user in the implementation of the HBase Shell mode connection HBase, error[[email protected] lib]$ hbase shellslf4j: class path contains Multiple slf4j bindings.
One, parenthesis, parentheses ()1, single parenthesis ()?? ① Command Group. The commands in parentheses will run in a new sub-shell sequence. So the variables in parentheses cannot be used by the rest of the script. Multiple commands in parentheses
The content of this article is very miscellaneous, but it is not difficult to understand, do not map by example.First introduce several characters commonly used characters:1 * matches any of any characters2? Match an arbitrary character3 # comment
Introductory ArticleLinux, we generally use the command line to operate, a good-looking command line, can make our work comfortable, this tutorial can be made to complete the command line style:Of course, you can change the more cool command-line
Once the backup SQL file is generated in auto-package, monitor the operation!#Crontab Time # variablesfile_dir=/data/mysql_bak/ #备份存放路径DATE = ' Date +%y_%m_%d ' #获取当前系统时间FILE_NAME = " Mysqldata_bak_$date.tar.gz "#最终保存的数据库备份文件名FILE =${file_dir}
#!/bin/bashEcho ' $ "gets the currently executing shell script file name: '" $ "Echo ' $n gets the nth parameter value of the currently executing shell script, n=1..9 ' $ ' =$1, ' $ $ ' =$2, ' $ $ ' =$3Echo ' $get all parameters for the current
The shell is the user interface of the Linux operating system, and we often need to write scripts to allow the operating system to automate the requirements of a series of instructions, this article will briefly describe the language features
Blog content is about the shell script number of the arrangement, more basic, mainly sharing logic, there are better ideas to share in the review of common progress.The script implementation prompts the user to enter 3 integers sequentially, and the
8.10 Shell Special Symbol Cut command\ de-Semantic charactersSeveral commands related to pipe breaksUsage of the cut-d commandUsage of the CUT-C commandSort is often used in conjunction with UniqSort is sorted, starting with special symbols, to
Tag: Date command displays case false cmd put who bar inputShell Exercise: Write a script to do the following: Enter a number, and then run the corresponding command. The command is displayed as follows: *cmd meau** 1--date 2--ls 3--who 4--pwd When
Trap commandtarpThe command is used to perform the action after the specified signal is received, usually in order to complete the cleanup when the shell script is interrupted. For example:When the script is pressed at execution time CTRL+c ,
8.6 Pipe break and job control pipe symbol "|"
The effect of a pipe character is to drop the result preceding the symbol to the command following the symbol. Not all commands are available after the pipe character, and generally commands
http://blog.csdn.net/shuanghujushi/article/details/51298672During the bash Shell's use, there are a number of string manipulations that are often encountered, and some of the individual usage summaries are summarized below.First, the definition of a
In the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.The printf command mimics the printf () program in the C library.printf is defined more by the POSIX standard, so a
Functions in the shell1. First case:[[email protected] shell]# sh fun1.sh the first par is bthe second par is athe third par is 2the script name is fun1.shthe number of par is 5[[email protected] shell]# cat fun1.sh #!/bin/bashfunction inp(){
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