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

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

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 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,

Several methods of shell script de-weight

Test file cat >testjasonjasonjasonfffffPress CTR + D to save1, Sort-usort -u testfffffjason2, UniqUniq TestjasonfffffjasonThis shows that Uniq needs to be sorted before it can be re-3, sort, pipe and uniq combined use Remove duplicates

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 |

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 position Variable

When we are learning some frameworks, we usually invoke a script when we start the framework, and pass some parameters to the script, and the script will do different things depending on the parameters we pass, and the parameters we pass are the

Determine if a string is empty inside the shell

determine if a string is empty inside the shell Category: Linux shell2011-12-28 23:18 15371 people read reviews (0) favorite report ShellThere are several main ways to do this:echo "$str" |awk ' {print length ($)} 'Expr Length "$str"echo "$str"

Conditional test statements in the shell

The shell has conditional test statements, which are usually done using the test command or the [] command, which is the basis of the conditional Judgment statement If~then statement, especially the [] command. Let's explain some of the conditional

Linux Shell Common Command Manual (Updating)

Check if the remote port is open for bash: NC-nvv $IP $PORTtelnet $IP $PORT Front and back switch for current task: Ctrl + ZFG The first 5 characters of the Intercept variable: ${variable:0:5} SSH Debug

Select usage in the shell

Select is also a kind of loop, it is more suitable for use in the case of user choice.For example, we have one such requirement, after running the script, let the user go to select the number, select 1, run the W command, select the 2 run Top

Shell multi-process concurrency

Business background: Let a.sh and b.sh execute simultaneously, not sequentially Solution: S.SH is responsible for dispatching a.sh and b.sh. The code is as follows:s.sh#!/bin/bashsource/etc/profile;date= ' 2015-05-06 '

Linux Shell Learning awk---beginner's notes

Pattern of 1.AWKBEGINENDexpression Example: nf>10 or/^a//regular expression/?You can use a/^a/like this.Another way of writing $ ~/^a///Field matchBetween expressions you can use && | | !?: Operators do Boolean operations (which can be regular

One of the Shell learning notes (shell built-in commands)

NOTES: # Note: The # in #!/bin/bash at the beginning of the shell file is not a comment run: 1, bash shell.sh 2, chmod +x shell.sh./shell.sh 3, add to Path change Amount of 4,. ./shell.sh Troubleshooting: 1, syntax error when running with prompt 2,

Shell Learning notes seven (looping)

Loops in a loop shell are mainly for,while,untile,select for 1, list for loop for VARIABLE in (list) do Command Done example: Loop print John's favorite fruit for fruit in apple orange banana pear Do echo "$fruit is John's

The use of the eight turns of the Linux shell

First, the file code"Steering" means that the standard input (such as the keyboard) should be read by other files, and the result should be displayed on standard output (such as screen) and output to other files. The concept of file descriptor is

Linux Shell six flow control--loop

One, for loop The For loop works by taking the serial element one by one out, putting it into the specified variable sequentially, and repeating the contained command area (between do and done) until all the elements takeUntil the end. Where serial

Hbase Shell operations (full record)

1. Enter the HBase command line>hbase ShellExit command line>quit2. Create a table>create ' users ', ' user_id ', ' address ', ' info '3. View All Tables>list4. View table Structure>describe ' users '5. Delete the table:>disable ' users ' >drop '

Sorting algorithm Big Collection _ Insert Class--Hill (shell) sort

The feature of this series of blogs is--give the results of each orderOriginally wanted to write a good process, get a picture of what, but think online analysis too much, are better, so these blog even if it is a summary of their own it.#include

Total Pages: 541 1 .... 333 334 335 336 337 .... 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.