Shell Project Distribution System-expect (next)

[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

Shell Project-Distribution system-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

Shell special Symbol Cut command, sort_wc_uniq command tee_tr_split command

One, Shell special character _cut commandDe-Semantic characters:[[email protected] ~]# c=\ $a \ $b//And #c = ' $a $b ' effect[Email protected] ~]# echo $c$a $bPipe characterCut split[Email protected] ~]# cat/etc/passwd |head-2 |cut-d ":"-F 1//Take

Differences and connections between the terminal (terminal), Shell, TTY, console, bash

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,

The while loop of the shell script

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,

Hbase Shell failed to start

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.

The role of various parentheses in the shell (), (()), [], [[]], {}

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

Linux Learning Summary (17)-shell Basics

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

The shell beautification tutorial under CentOS

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

Shell monitors whether automatic backups are successful (determine if files exist)

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}

A script to understand the meaning of positional parameters in a shell script

#!/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

Shell and script

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

The arrangement of several random numbers of shell scripts (arithmetic basis)

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

Shell special symbol cut, sort_wc_uniq,tee_tr_split command shell special symbol

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

Shell Exercise: Write a script to do the following: Enter a number, and then run the corresponding command. The display command is as follows: *cmd

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

Shell Signal capture Command trap

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-8.9 pipe and job control, shell variables, environment variables

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

Linux shell Learning (string manipulation)--01

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

Shell printf Command

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 and arrays in the shell

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(){

Total Pages: 541 1 .... 126 127 128 129 130 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.