Automated installation of shell scripts Universal binary format mariadb

#!/bin/Bashdatadir="/mydata/data"sqlconf=/etc/Mysqlinstalldir=/usr/local/mysql# about the installation package you can go to the official website to download, pay attention to download the common binary format, and then put on the FTP server can be #

Split string in Shell

Recently the system has learned shell programming.See an example in the book, very dick. I thought about it before, but I didn't get the result.I believe that the students also guessed this example, is a line of string splitting. Students can try it

Linux Shell Syntax Learning

File comparison Operators-e filename true if filename exists [-e/var/log/syslog]-D filename True if filename is a directory [-d/tmp/mydir]-F filename True if filename is a regular file [-f/usr/bin/grep]-L filename True if filename is a symbolic link

Shell theory Learning (II.)

30.tee: Reads the standard input and then displays it by the standard output and stores the data in the specified fileExecute this command, test.txt if it already exists, it will be emptied, if it does not exist a new file will be created, end the

RHCE Study Notes ($)-Shell

The shell script's reference book from the foundation to the advanced can find hundreds of, the beans here for the entire study note integrity, or audacity the most basic grammar review again. The most basic include variables, comparisons, operators,

Shell traverses each line of the file

Because the use for to read in the file line, will automatically put the space and newline characters as the same delimiter, because when there are spaces in the line, the output will be very messy, so ...Cat Input.txt |while Read line> Do> Echo

Shell exits, returns a summary

Common returns in the shell are: Exit,breakm,returnExitIn fact, after each command is completed, it will return an execution state!If the execution succeeds, it returns 0If execution does not exceed, return non 0!Example application: Use the shell

Shell Learning Notes (i)

1.1) Integer calculation:(1)$ (()): for mathematical calculationsecho $ ((3+3))(2)Expr: There must be spaces on either side of the operator, if $[] is included, you do not have to consider whitespace issuesExpr 2 + 22) floating point calculation:BC

Shell Progress bar

The tput and printf functions are required to print the progress bar in the shell.# tput Row col cursor moves to row row column Col# tput cols Gets the maximum number of columns in a window# tput lines Get window max running script# echo $LINENO Get

Shell determines whether the input is valid IP and letter

Tag: Shell Determines whether the input is valid IP shell determines whether the input is a letter1. Purpose of demandRecently in the study of ansible automation tools, in the host table (/etc/ansible/hosts) Add Management node information, a few to

Syntax knowledge of shell scripts--Process Control

①if-elif-elif-else-fiIf-fi' if ($a >); then echo $a; fi ' or ' if [$a-gt];then echo $a; Fi 'If-else-fi' if ($a =), then echo $a; else echo 30;fi ' or ' if [$a-eq];then echo $a; else echo 30;fi 'If-elif-elif-else-fi' if ($a >) && (($a =)); then echo $

Automatically clears the Date directory shell script

Many times backups usually use a date-based folder to create folders, and for these date folders There are a lot of subfolders, and for these date files are removed all the time, it is a bit of a struggle to combine RM or delete with find. This

Summary of Shell interception string methods in Linux

There are eight ways to intercept a string, mainly for the following methodsThere are a number of ways to intercept strings in the shell, ${expression} There are 9 ways to use them.

Common log statistics methods in the Shell

Before I published "Hadoop, kill chicken with sledgehammer, Python+shell to achieve the general log file query, statistics , "theneed to combine python, there may be a certain threshold, now the shell part stripping out. For example, some of the

Modify Shell terminal prompt information

The shell terminal only displays the user name, hostname, working directory by default, and sometimes we need to simply tweak the information displayed on the shell terminal to make the work more efficient. For example, we can add time to the shell

The shell logic of Linux

When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution; = = 1 o'clock, which indicates that the execution failed.' | | 'Left command returns FALSE,

Shell for, while usage

#数字段形式For i in {1..10}DoEcho $iDone#详细列出 (characters and not many items)For File in 1 2 3 4 5DoEcho $FileDone#对存在的文件进行循环For shname in ' LS *.sh 'DoName= ' echo ' $shname | Awk-f. ' {print '} 'Echo $nameDone#查找循环 (This method can also be used when

Linux Learning Shell script-------references and operators

[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020] Variables and substitution operations, one of the easiest mistakes to make when performing variable substitution in a script is to

Shell's While loop

The format of the while loop: while expression Do Commandcommand 、、、 Done1. Counter-controlled while loop:Used primarily for the number of data and strings that have been accurately known to be entered.Example:#!/bin/bashint=1 while (($Int. 5 ))

Shell exits and returns a summary.

Shell exits and returns a summary. Common Responses in shell: exit, breakm, return Exit: In fact, after each command is executed, an execution state is returned! If the execution is successful, 0 is returned. If the execution limit is not

Total Pages: 541 1 .... 432 433 434 435 436 .... 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.