Shell Scripting Learning

Startup script start.sh This script is used to start the project, log logs and PID#!/bin/shprg=" $" #$ A represents the current startup script # Get the true path of the file while[-H"$PRG"]; Dols= ' Ls-ld"$PRG"' link= ' Expr"$ls": ' .*-> \ (. *\) $"

Shell Programming Awk Advanced

awk operatorArithmetic operators: x+y, X-y, x*y, x/y, X^y, x%y-x: Convert to negative +x: convert to NumericString operator: unsigned operator, string connectionAssignment operators: =, + =,-=, *=,/=,%=, ^= + +,--Comparison operators: = =,! =,;, >=,

009-shell function

First, function definitionThe Linux shell can be user-defined functions and can be called casually in shell scripts.The functions in the shell are defined in the following format:function ] Funname [()]{ action; int ;]}Description 1,

Common shell commands under Linux

English original link: https://www.lopezferrando.com/30-interesting-shell-commands/1. Monitoring commands (run every 2 seconds)"ls -larth"2. Kill the program with one portsudo fuser -k 8000/tcp3. Limit the memory usage of the following

[To] Linux under the shell to use the upper and lower keys to turn out the history of the name of the ^[[A^[[A^[[A^[[B^[[B problem resolution, Linux using BACKSPACE ^h solution

[From]Https://www.zmrbk.com/post-2030.html40952771My understanding is that if the problem described in title occurs, it is because of the combined effect of using different shell programs and corresponding stty to set the corresponding

Five week fourth lesson 8.6 pipe and job control 8.7/8.8 shell variable 8.9 environment variable configuration file

8.6 Pipe symbol and job control8.7/8.8 Shell variables8.9 environment variable configuration file 8.6 Pipe symbol and job control 1. Pipe Symbol | Pass the result of the preceding command to the following commandFor example, # cat

Five week fifth class 8.10 Shell special symbol cut command 8.11 Sort_wc_uniq command 8.1

8.10 Shell Special Symbol Cut command8.11 Sort_wc_uniq Command8.12 tee_tr_split Command8.13 Shell Special Symbol Shell Special Symbols * represents all characters for wildcards ? is a single character is the

Bash Shell summarizes "four" regular expressions

Regular expressionsSingle character notationThe character itself . \d \d \w \w \ t \ r \ \s \s [ABC] [A-c] [0-2] [1-3a-cx-z] [^ABC] [: Upper:] [: Lower:] [: Alpha:] [: Alnum:] [:d igit:] [: xdigit:] [:p UNCT:] [email protected]\^_ ' {|} ~-][: Blank:]

Shell Programming (i)

[TOC]Shell programming One, Shell script introduction The shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.The shell is a scripting language;Can use

Daily shell scripting Exercises (02)

1. TopicsThere are log 1.log, part of the following:112.111.12.248 - [25/Sep/2013:16:08:31 +0800]formula-x.haotui.com "/seccode.php?update=0.5593110133088248" 200"http://formula-x.haotui.com/registerbbs.php" "Mozilla/4.0 (compatible; MSIE 6.0;

About the shell script read the parameter issue

There are two ways to send a shell script:Way 1:sh file.sh arg1 Arg 2 ....Mode 2:read-p "hint" Arg 1 arg2The default parameters are directly separated by a space, following a few examples to explain the problems encountered in the communication and

"Shell" Linux Shell's while loop

While and for are circular statements, relative, the For loop uses a bit more. But the while loop is especially useful when reading a file line.While formatwhile [ 条件 ]do 内容done Example: Determine if I is small and equal to 5, if less than

Shell Script Summary

Shell Script Summary ArraySeveral common uses of indexed arraysarray[0] array数组的第一个值array[*] array数组的所有值#array[*] array数组里数值的个数unset array[0] 删除array数组里的第一个值unset array 删除掉array整个数组Array slices: ${array[@]:num1:num2} num1:要跳过的元素个数

Shell Script Specification format

#!/bin/bash#Date: Writing Time 2016-11-22 15:04:12 # #date "+%y-%m-%d%h:%m:%s"#Author: author#Mail: Email [email protected]#Function: Script Introduction#Version: version V1.1#Update: Script Modification Update time6.1.1 version and Operating

Mac Shell Terminal Edit command line shortcut key--line beginning, end of row

Ctrl + d        删除一个字符,相当于通常的Delete键(命令行若无所有字符,则相当于exit;处理多行标准输入时也表示eof)Ctrl + h        退格删除一个字符,相当于通常的Backspace键Ctrl + u        删除光标之前到行首的字符Ctrl + k        删除光标之前到行尾的字符Ctrl + c        取消当前行输入的命令,相当于Ctrl + BreakCtrl + a        光标移动到行首(Ahead of line),

The arithmetic operation of Linux shell programming

+ Plus-Minus* Multiply/except* * Sub-party% take-upThese operational symbols need to be escaped in some scenarios. For example, in a wildcard scenarioThe operation must be two brackets or a bracketLet operation does not display the result and

Shell Learning Notes (3)

If one, if base 1, single branch 1.1 syntaxif语句语法 单分支结构语法: if [条件]; then 指令 fi 或 if [条件] then 指令 fi1.2 Examples[[email protected] day4]# cat if-single1.sh #!/bin/sh#功能:单分支if结构整数比较,用-lt格式例子#created by

New Peanut Shell +tomcat released Javaweb project "pro-Test effective"

First, new peanut Shell 1.0On the Peanut Shell official website (http://www.oray.com) Download "New Peanut Shell 1.0" installation software, software installation completed, need to register, after the successful registration of Peanut Shell website

Shell string array

Array Declaration ArrayDeclare-a Array_NameDeclare-a array_name: Associative arrayNote: The two cannot be converted to each otherArray name and subscript (index)Index: Numbering starting from 0, which is a numeric indexNote: Indexes can support the

20.16/20.17 function in Shell 20.18 array 20.19 alarm system requirement analysis in shell

20.16/20.17 functions in the shellImplicit functions for displaying variablesResults of executionparameter is only one 1, the result of the first is 1, the second is empty, the third is empty, the name of the limb is fun1.sh, a total of 1

Total Pages: 541 1 .... 156 157 158 159 160 .... 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.