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.
Conditions= equals applies To: integer or string comparison if in [], only the string! = is not equal to: integer or string comparison if in [], only the string-eq equals applies To: integer comparison-ne not equal to: integer comparison-lt less
Shell Introduction1.Shell was born in Unix,unix's first scripting language, which is a tool for interacting with unix/linux, it is meaningless to learn the shell alone, and the proficiency of the shell is a reflection of the user's proficiency in
Shell's Features~/.bash_history command history to store files, log out after saving.$HISTSIZE the number of command history bars, which allows the ~/.bash_history file to store the number of command bars, by default.!! : Previous command!$: Last
Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the
grep (Global search Regular expression (RE) and print out of the line, fully search regular expressions and print out the lines)grep is a powerful text search tool that uses regular expressions to search for text and prints matching lines without
1. Regular expressionsIn fact, it is a specification, that is, the pattern, constraint string, and so on what kind of format, such as the requirement that the string must begin with a, t end, strings that meet such conditions will use the regular
Requirements:1. Create a directory/tmp/scripts2. Switch the working directory to this directory3. Copy the/ETC/PAM.D directory to the current directory and rename it to test4. Change the current directory's test and the owner of the files and
Repeating a series of commands while running a script is common, and we need to use loop statements to do this.One, for commandFormat: for variable in list;Loop bodyDoneThe for command iterates through each value in the list and exits the loop after
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
1. the server needs to clean the common shared directory of the FTP server 17:30 every week, first check the/var/ftp/pub/directory, and then save the detailed list and current time information of all subdirectories and files to/var/log/ Pubdir.log
Enterprise Real Shell interview questions, a challenge to put!Statement: If there is a similar, purely plagiarism1. Develop a daemon script that executes every 30 seconds to check MySQL master-slave synchronization[email protected] scripts]# cat
MethodsBoth the Processbuilder.start () and the Runtime.exec () methods are used to create an operating system process (to perform command-line operations) and return an instance of the process subclass that is used to control the status of
First write a test script test.sh on the remote server and give the executable permission: chmod +x test.sh#!/bin/bash echo ' test22 ' echo $$ $ is the first parameter passed in the script, and our console prints this parameterTo create a new MAVEN
Linux Machine First installs wmi-1.3.14.tar.bz2TAR-JXVF wmi-1.3.14.tar.bz2CD wmi-1.3.14MakeCP samba/source/bin/wmic/usr/local/bin/Pass parameter information through the file into the script and get the outputWmi.sh ————————————————————#cat/mess/host|
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