Linux backup database and upload to remote server (scheduled execution shell for FTP upload)

#========================start shell Script ============================#!/bin/bash# defines the user name and password to use when backing up the database db_user= "root" db _passwd= "111111" #定义FTP服务器地址, user name, password, directory Ftp_url=113.1

23. Shell Introduction, Command history, command completion and aliases, wildcard characters, input and output redirection

23. Shell Introduction, Command history, command completion and aliases, wildcard characters, input and output redirectionFirst, Shell introductionThe shell is the intermediate medium that the system interacts with the computer hardware, it is just

Variable assignment for shell scripts

Parameter related knowledge${parameter:-word}: If parameter is empty or undefined, the variable is expanded to "word"; otherwise, the value of parameter is expanded; ${parameter:+word}: If parameter is empty or undefined, do nothing; otherwise,

Inside the shell the meaning of the beginning of the $, as well as the extension

For the set in the shell and the use of eval:Set position parameters (same as command line script)The role of Eval is to describe the second time[Email protected]:/home/xpg# set--Hello Shanghai Liangge [email protected]:/home/xpg# eval echo \$$

Regular expressions in the shell

Regular Expressions (regular Express)The expression of a rule, which is to represent data with the same characteristics with some pre-defined symbols, almost all programming languages use regular expressions (regular) and are common in different

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

Implementation of dependency processing and parallel compilation of Docker image under shell

Implementation of dependency processing and parallel compilation of Docker image under shellRecently, when making a series of Docker image compilation scripts, I thought we could not speed up the parallel compilation, checked the data, and finally

[Svc]shell Script

I will regularly collect some good shell and PY scripts to see here, for reference learning:Shell resources:Https://github.com/lannyMa/ops_doc/tree/master/LazyManageCheck Help Chinese Culture sh yum install man-pages-zh-CN -yecho 'LANG=

Problems with using SSH commands in a while loop under the shell

1 Description of the phenomenonThe most recent batch execution command using SSH (with key trust already done), the script reads the list of hosts in the configuration file (the content is one host IP address per line), and then executes, but every

Centos7--shell script automatically implements bond configuration

#!/bin/bash# Create a link interface named Bond0 ip=$1gate=192.168.18.1eth1=eno1eth2=eno2#eth3=eno3#eth4=eno4modprobe bonding# Back up the NIC 1 file cp /etc/sysconfig/network-scripts/ifcfg-$ETH 1 ifcfg-$ETH 1.bak# Modify the NIC Profile

Shell Learning Notes

Special variables$ A: The file name of the current script$num: Num is a number starting from 1, and $ is the first argument, and $ is the second argument, ${10} is the tenth argument$#: Number of arguments passed in the script$*: All positional

Shell shortcut keys

Shell shortcut keysTry all the CTRL keys in bash and summarize the following (all keys that appear below are CTRL key combinations):1. U K YU remove the previous characters from the cursor (not included)K Delete the next character of the cursor

Logical judgments in shell scripts

Logical judgments in shell scriptsIf logic is judged. The basic syntax for if judgment in the shell is:1) without ElseIf judgment statement; then COMMANDFIFor example:[email protected] sbin]# cat if1.sh#! /bin/bashread-p "Please input your score:

Shell Programming for loop Summary

Shell Programming for loop Summary In shell programming, the execution of a loop is repeated several times for a piece of code, a common loop has a for, while, and a until loop, where the for loop is often used for finite cycles, and the

The while loop of the shell loop structure

While loop1)While CONDITION; DoStatementStatementDoneWrite a script that calculates 1---100 of the AND#!/bin/bash#Sum=0I=1While [$i-le 100]; DoLet sum= $sum + $iLet i= $i +1DoneEcho $sum2)While true; DoStatementStatementDone#!/bin/bash#While true;

Set command detail: On, turn off Shell feature properties

Set is a shell internal command to turn shell feature properties on or off, and if nothing is added, the user-defined variables and environment variables are displayed directlySyntax: Set [Options ...]Options:- F : Disable wildcard characters+f :

Linux Shell Basics-2

Pipe character Fg Bg Sleep Variable Set Defining variables Variable classification Cancel a variable environment variable configuration file Pipe character管道命令操作符是:”|”,它仅能处理经由前面一个指令传出的正确输出信息,也就是

The meaning of >/dev/null in shell scripts

In Linux/unix, the information generally seen on the screen is from stdout (standard output) or stderr (standard error Output). Many people will ask, output is output, sent to the screen does not have, why is divided into stdout and stderr it? That

Traversal of the shell-array

Multiple values can be stored in an arrayThe shell array is represented by parentheses, and the elements are separated by a "space" symbol.Syntax format:Array_name= (value1 value2 ... valuen)Defining

Shell directives in Windows 10

This article does not have the technical content, also not big on, but think, still write down, certainly someone will use to get.Often play system friends, should know the Shell instructions, this is a very fun and magical instructions. With it,

Total Pages: 541 1 .... 127 128 129 130 131 .... 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.