Trigger Brief1, Trigger basic concept2. Trigger syntax and practical examples3, before and after differencefirst, the basic concept of triggers1. Triggered2. Role: Monitor a situation and trigger an action3. Observe the sceneAn e-shop:Product list,
Select Connection Query Brief:Union Union Query Second, about the internal connection Union Union Query
Function: Merge 2 or more query results together
Details: (table 1 Query results) Union (table 2 query results)
Execution: The results of
Processing of parameter processing-shell incoming parameters1. The number of arguments passed to the script by $# 2. $* displays all parameters passed to the script in a single string. Unlike positional variables, this option parameter can exceed 9 3
Script Programming Control Structure:OrderSelect: If, caseLoops: For, while, untilFor variable in List;doStatementDoneFor ((CONDITION));d oStatementDoneWhile Condition;doStatementDoneUntil Condition;doStatementDoneLoop Example: Test whether all
design a script that monitors the surviving state of a remote machine (assuming IP 123.23.11.21) and sends a message to yourself when it finds an outage. Tips:1. You can use the ping command ping-c10 www.baidu.com2. The order to send the email is
Difference:internal command: Internal commands are built into the shell. The internal command executes very quickly when the shell command is executed. This is because no other process has been created because of the execution of this command. For
When you practice select in Http://wiki.ubuntu.org.cn/Shell%E7%BC%96%E7%A8%8B%E5%9F%BA%E7%A1%80, you find that the direct SH xx.sh cannot be executed successfully.Script content:#!/bin/bashecho "What's your favourite OS?"Select Var in "Linux" "Gnu
Trap commandBasic format: Trap command SIG1 SIG2 ... signThere are 3 types of signals that can be captured:Exit: Exits from the function, or the entire script finishesERR: When a command returns a non-0 status code, the command execution is
1. Real-time view of the shell types used in the current process: recommendedThe code is as follows:PS | grep $$ | awk ' {print $4} '(Note: $$ indicates the shell's process number)2. The most common command to view the shell, but cannot reflect the
1. Command history:By pressing the UP ARROW key, you can traverse backward through the most recently entered command under the console, and by pressing the DOWN ARROW key, you can traverse the command you recently entered under the console.You can
Write Shell script:1) Editor like VI or Mcedi2) Set Execute permission for your scriptchmod permission Your-script-namechmod +x your-script-namechmod 755 your-script-name This would set read write execute (7) permission for the owner, for group and
1. ls commandThe LS command is the meaning of listing directory contents (list directory Contents). Running it is to list the contents of a folder, possibly a file or a folder.The "ls-l" command lists the contents of the folder in detail mode (long
The shell is a program written in C language.Several common Shell:bash, SH, csh, ksh, etc.Bash is the default standard shell for Linux and is fully compatible with SHSH is the default standard shell for UNIXAsh is the smallest resource-intensive
#/secondin/secondfirstshecho "Please enter the Numseconder"Read FirstRead Secondif test $first-eq $secondThen echo "The No.2″"Elif Test $first-GT $second//Determine if it is greater thanThen echo "The No.2″ >else echo "No.2″ FiExample 2. Find out if
Original: Http://note.youdao.com/share/?id=cd2ad6e6d5db2b347f92958efc2bdbc1&type=noteRegular expressions and wildcard characters:First, Introduction:1. A regular expression is used to match a string in a file that matches a condition .contains
1. Explanation: A single string that describes or matches a series of strings that conform to a certain syntactic rule.Action object: StringMany are used in document editors or other tools to retrieve and replace text content that conforms to
Summary of this chapterVariables are a must in a very small program . The shell variable retains the string value , and a large number of operators can be ${var ...} used in , let you control the result of the variable .Shellprovides a number of
The special variables IFS in shell, and the special variables IFS in shell
As I get used to the writing style of python, I often want to use bash to traverse the lines of a file and process the lines read.
But in a strange situation, if my text is
Shell-automatically deploy the war package to tomcat#! /Bin/shCURL = $1CRootDir =/data/tomcat-usercenterShRootDir =/data/tomcat/dll# Delete old versionRm-rf $ shRootDir/usercenter-web.war *# The default war package address is the last successfully
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