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.
Commands frequently used in the shell for regular expressions include grep, sed, awkThe contents of the file used for testing[email protected] ~]# VI testfileCurrent Network StatusLast Updated:mon Feb 10:55:06 CST 2016Updated every secondsNagios
The most important system program that Linux systems provide to users is the shell command language interpreter. It is not part of the kernel, but is run as a user state outside the core.Its basic function is to interpret and execute various
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
--stdin indicates that a standard input can be made with any fileExpect its main function is to add a shell to the SSH process to pass the interactive instructions.Its core is the spawn expect send setSpawn calling the command to executeExpect waits
Shell-related usageIf usage-Q does not output results, only make judgments[Email protected] tmp]# if Grep-q ' ^daixuan: '/etc/passwd; Then echo "Daixuan text"; fi, when/ETCPASSWD contains Daixuan, the output Daixuan testCase usage[Email protected]
#!/bin/bashRead-t 30-p "Please enter the partition you want to find (format Sda1~sda3):" AAAnumber=$ (df-h | grep $aaa | awk ' {print $} ' | cut-d "%"-F 1)If [$number-ge "70"]Thenecho "is not working properly, the message has been sent to your
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
Shell Programming Four musketeers:Sed awk grep findSed can replace, delete, add, pick, and select data rows for specific tasks1.sed If you do not add any parameters, you will not be able to modify the contents of the file. The plus-i parameter is
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
First, shell variables1. Variables can be divided into two categories: environment variables (global variables) and local variables.Environment variables: All environment variables are system global variables that can be used in all child processes,
The function is actually to give a code a name, each time you use this code can directly use the function name to invoke it.First, create a functionThere are two kinds of formats for creating functions:Format 1:function function name {function
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
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.