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,
On the machine to open an account to colleagues, the result of SSH landing, complete, highlighting are not, but my own account can be. The first suspicion is that there is a problem with the. bashrc file setting, compared to 2 user directories, this
As I get used to Python's writing style, I often want to use bash to iterate through the rows of a file and process the rows that are read.But a weird situation if my text resembles thisThe first line.The second line.The third line.For line in ' cat
1. Variable Reading example: Echo $PATH echo $ (PATH)2, Variable assignment: AA=ASDF Note: There is no space around the equals sign3. View all environment variables: env4. Id:echo $$ of the current thread5. Custom variable to environment variable:
The operation of commands is analyzed and run from top to bottom, from left to right.
The order is released as mentioned in the fifth chapter: multiple blanks between commands, options, and parameters are ignored;
Blank lines are also
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
Transferred from: http://blog.sina.com.cn/s/blog_464f6dba0100psy9.htmlVariable 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
wrote a script to automatically generate PDF uploads GitHub can't stand every time the same commit decides to use a script to pass the argumentSimple and easy to use bold method, more complex can refer to the following two detailed.How to pass
1. Press the TAB key for the command to be padded2, clear or ctrl+l clear screen3, ctrl+u Delete the command before the cursor4. History view executed commands5, the key of the arrow keys can see the executed command1. Command aliasesExample: Alias
Recently in the study of shell programming, the text if there are errors in the place also hope that you criticize.Let's start with a simple summation function.#!/bin/bash#a test about function78f_sum(){ return $(($1+$23536);echo$total,$?;Note
Format: Test conditionString test: Note space: Test STR1 = = STR2 Tests if string is equal test str1! = str2 test string is not equal test STR1 tests if string is not empty test-n str1 test string is not empty test-z str1 Test whether the string is
1.crash Log run-to-collapse positioningDwarfdump--arch=--lookup 0x44b79 .app.dsymAtos-arch o .app/ 0x000235f32.xcode installation path Query and settingsXcode-select-print-path #查询Xcode-select--switch #设置3. View the instruction set of the
. Cat commands"Cat" stands for Nexus (concatenation), connects two or more text files, or prints the contents of a file in standard output form.. CP command"Copy" is the copy. It copies one file from one place to another.MV CommandThe "MV" command
Manually enter a line of strings and sort them.The script is as follows:#!/bin/bash#a test about sortEcho "Please input a number list"Read -AArrs for((i=0;i${#arrs [@]}; i++)) { for((j=0;j${#arrs [@]}-1, j + +)) {if[[${arrs[j]} -GT ${arrs[j+1]}]];
Fly2015I love cracking training first elective homework 5 practice procedures, in the company when using the tulip OD Debugging the shell program when there is a problem, but home with my love cracked version of od a debugging, all body spirit cool,
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
In shell scripts, how does one write a line feed to a file,
Test environment: ubuntu12.04 LTS version
Echo> file.txt,
This method has the same effect on bash and sh at the beginning of the script,
Echo-e> file.txt is only applicable to bash.
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.