Shell script one-click Installation MySQL5.5

You must download the MySQL5.5 binary compression installation package before executing the script. I have downloaded it in advance. Execute the shell script below.#!/bin/bash#auth:taoyake/bin/mkdir -p /taokey/toolscd /taokey/tools/tar -zxf  mysql-5.

Shell Programming Learning Note _20160114

Cat command Display file [Email protected] zsh]#CatFstab.stest1: .test2: .[email protected] zsh]#CatFstac.stest1: .test2:2018[email protected] zsh]#Cat*. S #合并文件test1: .test2: .test1: .test2:2018[email protected] zsh]#Cat*.s |Sort#合并和排序文件test1:

Shell---Login failed IP add to/etc/hosts.deny

/etc/hosts.deny: Commonly known as blacklist, control remote access settings.#!/bin/bash           //program starts #file: hosts_deny.sh# date: 2016-01-10grep  ' Failed password '  /var/log/secure | awk  ' {print $ One} '

Several small topics of shell variables

1. Describe the results of the following commandsMore/etc/shellsDisplays all the contents of the shells text.Echo $SHELLView the shell program used by the current user.History-cClear historical and practical commands.Echo $HISTIZERecord the history

Linux_ Shell configuration file for user perspective

The type of shell that stands on the user's point of view:Log-in Shell:Log in normally via a terminalSu-usernameSu-l usernameNon-landing shell:SU usernameOpen Command Window under graphics terminalShell scripts that are executed automaticallyBash

Shell---case, for, while

Case section:#!/bin/bash                                 //program starts #file:  case.shecho  "==========" echo  "welcome!" echo  "1 copy" echo  "2 delete" echo  "3 backup" echo  "4 Quit" echo  "= = = ======= "echo " Please input your select: "read 

Shell combat problem, can you make it all?

18-Channel Shell advanced Programming enterprise face testhttp://oldboy.blog.51cto.com/2561410/166516321 operation and maintenance personnel will have shell face questionshttp://oldboy.blog.51cto.com/2561410/1632876Enterprise Programming problems

Shell Auto-Configure Bond

#!/bin/bash# automatic configuration Bond#by liuqmodprobe= "/sbin/modprobe" cd /etc/sysconfig/network-scripts if  [ -f ifcfg-eth0 ]thencp ifcfg-eth0 /tmp/ifcfg-eth0.bakcp ifcfg-eth1 /tmp/

Shift operations in the shell

Positional parameters can be shift shifted left with the command. For example, the shift 3 original $4 now become $1 , the original $5 now become and $2 so on, the original $1 , $2 $3 Discard, $0 do not move. Commands with no parameters are shift

The use of SEQ in the shell

The use of SEQ in the shellExample:/bugzilla/group.00....group.99 more than 3 years of data mv to/history/bugzilla/group.00...group.99Seq-w (-w = 0 in front to make the same width)#!/bin/bashFor Inum in ' seq-w 00 99 'DoSsdir=/bugzilla/group.

Shell's Tomcat log backup

#!/bin/bashbackdir=/backup/logs/' Date +%f ' catdir=/home/tomcat/apache-tomcat/logsbackfile= ' find $CATDIR-type F- Mtime +3|grep-v catalina.out ' ceshi= ' echo $BACKFILE |wc-l ' Logfile=/home/lichuang/backup.logbackup () {if [$CESHI-le 1]t hen echo

Application of select in shell scripts

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 and then execute the command!#!/bin/bashselect Mysql_v in

Shell Common Scripts

Objective Online collection, thank the old boy and the big God, often read their blog and video, script is absolutely their own pure hand, what shortcomings, but also please the Great God guidance. If you feel that there is a violation of the

Shell backup + to determine if the transfer is complete

#!/bin/bash#by lc#dir=/rootdir=/server/scriptsyuanfile=hins423437.tar.gzbakfile=hins423437_xtra_20.*. tar.gzlc  () {  if [  ' ls -l  $DIR |grep  "${bakfile}" |wc -l '  -eq  1 ]  then     duyuan= ' ls -l  $DIR |grep  "${YUANFILE } "|awk  ' {print $5}

The ANSI control of the bash shell

Format: echo-e "\033[word background color; font Color m string \033[0m"For example:Echo-e "\033[41;36m something here \033[0m"Where 41 of the position represents the background, 36 of the position is the color of the wordThose ASCII code is the

Shell Programming--eof (reprint) that requires interaction

In shell programming, "EOF" is usually used in conjunction with "Return to the keynote shell again, which can be interpreted as a delimiter (delimiter). Since it is a delimiter, the form is naturally not fixed, where "EOF" can beCustom, but the

Shell Learning notes-conditional judgment

1. Judging the format1) Test parameter fileExample: Test-e/root/install.log2) [parameter file]--Recommended useExample: [-e/root/install.log]Note: Spaces are required after and before the brackets2. determine file type parameters1)-D file: Determine

Note-shell Special variables

Positional variables:$: Gets the file name of the current execution shell, including the script path if the script is executed with a path $n: Gets the n=1..9 parameter value of the currently executing shell script, which represents the file

Getting Started with Shell programming

1.5 Cut command--split fileCut-d:-F 3/ETC/PASSWD take 3rd paragraph1.6 Sort Command--sortSORT-T:-k3/etc/passwd sorted by 3rd paragraph-N Sort by number-R Reverse Order-U Remove Duplicate entries1.7 WC Command-L Calculation of rows-W Computed

Shell reads text content

In Linux there are many ways to read a file row by line, the most common is the method in the following script, and is the most efficient, most used method. In order to give you an intuitive feeling, we will test the execution efficiency of various

Total Pages: 541 1 .... 423 424 425 426 427 .... 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.