#!/bin/bash#back_mysql by 2016-11-14bak_dir=/data/backup_db/' Date +%y%m%d 'Mysqldb=mysqlmysqluser=*****mysqlpw=******If [$UID-ne 0];thenecho "must to being use as root for exec shell"ExitFi#判断是否存在文件, \033[32m is the color of the displayif [!-D $bak
The day after tomorrow to reply, today only brush a question, have not written out, but want to update the blog, so only to write the previous things posted out.A shell script for partitioning1 #!/bin/Bash #指定脚本解释器路径 2 echo "Initial a disk ..." 3
Before modifying the file name#!/bin/bask#for A in $ (ls/etc/yum.repos.d/centos*);d oif [$a! = '/etc/yum.repos.d/centos-media.repo '];then #CentO The S-media.repo file name does not modify the MV $a $a. bak
1. Read basic reading 1 #!/bin/bash 2 #testing the Read command 3 4 Echo " Enter you name: " 5 Read name # 6echo"Hello $name, Welcome to my program. " Perform:#./read. SH Enter
Regular Expression - concept: A special syntax for describing text patterns -by ordinary characters (e.g., characters A to Z), and special characters (metacharacters, such as/ *?). And so on) make up a matching string--the text Filter tool supports
Explain:begin{} The most common use of this particular pattern is variable assignment. Begin this pattern is when the file does not begin to read.awk ' begin{fs= ': "; ofs="-"}{nf+=0}1", corresponding processing is 1:2:3---------> read the input
Case One• Write a login welcome script for ROOT to report the number of processes in the current host, the number of logged-in users, and the disk usage of the root file system.1. Using the VIM command in the /root directory is a new script file
grep formatgrep [Options] [mode] [file ...]-C outputs only the number of matching rows-n Lists all matching rows and displays line numbers-V Displays all lines that do not contain matching text-R Recursive Search-E supports extended regular
Recently encountered a problem,Execute script, script calls a command, command (Deamon) is a daemon, in order to debug, the daemon mode is canceled. The other commands behind the command (echo "456") cannot be executed.Deamon-d is initiated in
Super depth of the shell advanced programming practice, as of the current Shell programming courses in the domestic training institutions The most fine courses, do not believe in the level of students to see the performance. course cows are not
TextAaaaabbbbbcccccddddeeeeefffffkkkkkvvvvnnnnngggggThe following results are expected:aaaaa|bbbbb|ccccc| ddddeeeee|fffff|kkkkk| VVVVNNNNN|GGGGGMatch requirements: You want to insert a "|" between every 5 characters, and if the number of characters
I. Overview of CASE statementsUse case statements to rewrite if multiple branches to make the script structure clearer and more hierarchicalPerform different command sequences for different values of variablesThe case statement is structured as
There are a number of commands in Linux that can be divided into 10 categories (see [1]): 1) file management; 2) document editing; 3) file transfer; 4) Disk Management; 5) disk maintenance; 6) network communication; 7) system management; 8) system
Accessing HBase, and manipulating hbase, commands do not use semicolonsHBase Shell enters HBaseList View TableHBase shell-dHBase (main):024:0> scan '. META. '============= Small Example ===================================================1. Create a
First, define the array variable1. Grammar(1) arrayname= (parameter1 parameter2 ...)Example 1, define an array named name, with a value of Claire,obama,georgeName= (Claire Obama )(2) Arrayname= (Parameter1Parameter2...)Again we change example 1 to
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.