Automating backup databases with shell scripts

Because the individual station can not guarantee higher availability, there may be data easy problems, so it is necessary to achieve backup database needs, so I found some information on the Internet, combined with my actual situation, through the

Numerical calculations in the shell

#!/bin/bashecho "Please input number:" Read na= ' expr $n/100 ' #a1 = ' expr $n-$a * b= ' echo ' ($n-$a *100)/10 "| BC ' c= ' echo ' ($n-$a *100-$b *10) "| BC '  d= ' echo ' $c *100+ $b *10+ $a "| BC ' echo $d turn:

Shell's If statement

Today, to use the shell to do some auxiliary work, long time not to use, a little forgotten ...Here's a summary of today:1. If the brackets of the If judgment to leave enough spacesuch as if space [space content space];then........Fi2. The condition

Test command usage in shell syntax

The test command usage. Function: Check file and compare value 1) Judge the expression if test (expression is true) if test! expression is false test expression 1–a expression 22 expression is true test expression 1–o expression 22 expression has a

The function and library of Shell learning (I.)

Functions are the essence of the shell, and with functions and libraries, the shell handles complex problems as well as the compiler language, gravitated the importance of shell functions and libraries.1 Definition of functionRecommended UseHow to

Shell Learning Log

The variables of 0.shell are different from the environment variables, and the user environment area exists. Variables are assigned in the following way: Variable_name = variable_valuea= "Hello" $a the value of a on the variable, and several Linux

Hadoop's--hbase shell command

Reprint Please specify source: http://blog.csdn.net/l1028386804/article/details/46463503HBASE ShellEnter HABSE database terminal: # $HBASE _home/bin/hbase ShellCreate a table>create ' users ', ' user_id ', ' address ', ' info 'Table users, there are

Shell Script (iv)

Shell Script (iv)(7) TR command#实现字符转换功能#-c string: Inverse string character set, that is, all character sets except for the string#-d string: Delete all occurrences of characters in string#-s: Deletes all occurrences of a sequence of characters,

Shell Change Password to original password

After the password expires, change the password to the original password, the server a lot of work, write scripts to complete.After logging in, modify the prompt to: doraemon# convenient expect matchModify Lang=c, prompt for English to prevent

Shell rewrite built-in command--CD

Introduction to the sceneUse Cygwin under Windows, use Apktool to repackage apk; Way OneCD D:CD path/to/apk/in/dApktool D name.apk Way TwoDrag the file into the Cygwin window to delete the trailing file nameCTRL + ACD SPACEApktool D name.apk Mode

Automating the deployment of DHCP services with Shell scripting, plus text-to-document verification

The automated DHCP service shell script is as follows:#vim auto_dhcp.sh#!/bin/bashread -p  "please input your ip: "  IP       #设置dhcp服务器ipread  -p  "please input your gw: "  GW       #设置dhcp服务器网关IPNET =$ (echo  $IP  |awk -F.  ' {print $1 '. " $ "." $

Linux Shell Script Raiders (1.7)

1.7 arrays and associative arrays An array is a very important part of Shell scripting, and it uses indexes to store multiple independent independent data as a collection. An ordinary array can use integers only as an array index, and

Shell Learning Select cycle

Learning cycle, see a lot of for,while, or until, and select with less, here is a little summary of the next select this cycle.Basic structure:Select VALUE in LISTDoCOMMANDDoneAnd the reality out of the structure is probably a number before the

Case Process Control in the shell

Case Flow control:Case structures are used for condition judgments in a variety of situations. Similar to switch/case statements in other programming languages, but it is very different from the grammatical form.Case string inModeStatement;;Mode 2 |

Basic usage of HBase shell

HBase provides a shell terminal to interact with the user. Use the command Hbaseshell to enter the command interface. You can see the Help information for the command by performing a helper. Demonstrate the use of hbase with an example of an online

Shell Monitoring Script 4

#!/bin/sh#count memory_used_rate,disk_used_rate # @yuanwb  2015-5  #disk_used_rate #depend  on real storage place the parameter  ' Location '  need to  Alter. location=/dev/sda1disk_used_rate1=$ (df -h | grep  $Location  | awk  ' {print $5} ') free1=

Shell Operation Memcache

[email protected] mc]# cat mc.sh#!/bin/bashfunction Random {mc0= "192.168.8.62 7510"#MC1 = "192.168.30.22 7510"Case "$ (expr $ (date +%s%n) \% 2)" in0)Mc= "$MC 0";;1)mc= "$MC 1";;Esac}> Set-result.txt> Get-result.txt> Delete-result.txtFor ((i=0;iDoa=

Linux Shell Script Raiders (1.2)

1.2 Terminal printing A terminal is an interactive tool that allows users to interact with the shell environment. Printing text in a terminal is a basic task that most shell scripts and tools need to perform daily. Through the terminal

The variables of shell learning

A variable definition1 explicitly defined variable=xxx no spaces2 Read variable ReadingThe following two lines of code are written, reading name and namefamilyRead-p "Please input your name:" NameRead-p "Please input your whole name:" Name familyRun

Shell-based variables

Shell-based variablesVariable typeShell variables include environment variables, location variables, pre-defined variables, and custom variables.Environment VariableShell environment variables are a type of Shell predefined variables used to set the

Total Pages: 541 1 .... 261 262 263 264 265 .... 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.