Description of the IF, while, for statement for the shell of Linux

I. Basic conditions of judgment1) Logical operators-A expr1-a expr2 logic and-O expr1-o expr2 logic or! !EXPR1 Logical Non-2) Numerical judgment-eq num1-eq num2 is equal-ne Num1-ne num2 is not equal-GT NUM1-GT num2 is greater than-ge Num1-ge num2 is

Shell Step by Step (4)--cron & Echo

6. Script timed Tasks# Example of job definition:# .------------------------- minute (0 - 59)# | .--------------------- hour (0 - 23)# | | .----------------- day of month (1 - 31)# | | | .------------- month (1 - 12) # | |

A 9*9 multiplication table written in shell script

The 1 script is as follows[[email protected] ~]# vim 99.sh #!/bin/bash # 9*9 Table # 2015.5.26 by Luzhi for i ' {1..9}do for J ' {1..9} do If [$j-le $i] then c=$ (($i * $j)) ECHO-E-n "$j * $i = $c \ T" fi do echo "" Done2 Operating effect650)

Shell Monitoring Script 1

#!/bin/sh#count memory_used_rate,disk_used_rate # @yuanwb  2015-5  #disk_used_rate #depend  on real storage place the parameter  ' Location '  need to  Alter. location=/dev/sda1disk_used_rate1=$ (df -h | grep  $Location  | awk  ' {print $5} ') free1=

Shell Monitoring Script 3

#!/bin/sh#count memory_used_rate,disk_used_rate # @yuanwb  2015-5  #disk_used_rate #depend  on real storage place the parameter  ' Location '  need to  Alter. location=/dev/sda1disk_used_rate1=$ (df -h | grep  $Location  | awk  ' {print $5} ') free1=

Turn-shell Notes--command: Sort,uniq,join,cut,paste,split

Transferred from: http://blog.csdn.net/wklken/article/details/6562098Sort,uniq,join,cut,paste,splitCommand--sortSort classifies many different fields in different column orderCommand format:Sort–cmu–o Out-putfile [Other options] *POS1 *pos2

Polysh Bulk execution of shell commands

Installing Polyshwget http://guichaz.free.fr/polysh/files/polysh-0.4.tar.gztar -zxvf polysh-0.4.tar.gzcd polysh-0.4sudo python setup.py installUsing Polysh Usage:/usr/bin/polysh [OPTIONS] HOSTS ... Control commands is prefixed by ":".

[Linux]shell Multi-process concurrency-detailed version

Business backgroundThe schedule.sh script is responsible for scheduling the execution of the user's trajectory engineering script, and intercepts some of the code as

Linux shell String Operations (length, find, replace) detailed

Original address: http://www.cnblogs.com/chengmo/archive/2010/10/02/1841355.htmlString-related operations are often involved in the shell batch process. There are a lot of command statements, such as: awk,sed can do string various operations. In

Enable or disable shell built-in commands

View types of commands: type[[Email protected] ~]# type CDCD is a shell builtin[[email protected] ~]# type Lsls are aliased to ' ls--color=auto ' [[Email Protected] ~]# type-a Lsls is aliased to ' ls--color=auto ' ls is/bin/ls[[email protected]

Shell script provides only integer arithmetic operations (three ways)-((expression)), let "expression", value= ' expr Expression Right ' (reprinted)

Transferred from: Http://blog.163.com/[email protected]/blog/static/132229655201131055455754/Numeric operations:Only integer arithmetic is provided in bash, and the shell is implemented by the two commands of Let and expr .Use the format: let "x=

How to determine the number of input parameters in a shell script submission: Junjie font: [Increase decrease] type: Reprint

How to determine the number of input parameters in a shell script submission: Junjie font: [Increase decrease] type: Reprint This article mainly introduces the method of judging the number of input parameters in shell script, using the built-in

Shell getopts and getopt usage

1#!/bin/Bash2Temp= 'getopt-O HM:--LongAai:,mai:-N'getopts.sh'--"[email protected]"`3Eval Set--"$TEMP"4 while true5 Do6 Case " $" inch7-h|--AAI)8 Echo$29 Shift 2;;Ten-m|--mai) One Echo$2 A Shift 2;; ---) - Shift the Break ;; -*)

Shell Script View apk signature information

Wrote a script to view the APK signature with the shell. The code is very small and simple.Supports recursive directory queries#!/bin/bash# how to use the./getcertificate.sh xx.apkget_signature () {path= ' jar tf ' $ ' | grep RSA ' #查找apk中RSA文件 jar

Three advanced variables and strings for the Linux shell

Advanced variable contains three parts1. Variable expansion2. Command replacement3. Arithmetic ExpansionIn the bash shell, the $ operator triggers the above three extensions in the following basic form:Basic types of extensions examples${variable

26 Ways to practice the substring of a Linux shell by taking variables

######### #20150419 ############################# #题目: Variable a= ' a/b/c ' how to intercept get c @@@@@@@@@@@@@@@@ From the operation and maintenance class 21 long wing finishing @@@@@@@@@@@@@@@@@@@[[email protected] shell]$ uname -r 2.6.32-504.

Shell Script Add user Delete user Delete file script implementation

#/bin/bash#debug=0add=0del=0rm=0while [$#-gt 0]docase $ in-v|-verbose] debug=1shift;; -H|--HELP) #帮助文档echo "' basename $ '--add list--del list-h|--help--rm list" Exit 0;; --add) #添加用户ADD =1adduser=$2shift 2;; --del) #删除用户DEL =1deluser=$2shift 2;;

Two variables and arrays of the Linux shell

First, what is a variableShell programming language is a non-type interpreted language, unlike the C++/java language programming requires the declaration of variables, the shell assigns a variable, in effect, it defines the variable, in all Linux

The shell program mounts the iso image file and configures the local yum source,

The shell program mounts the iso image file and configures the local yum source, write a script, mainly do 1. Mount the local iso image file 2. boot the local iso image and mount it automatically 3. Use the iso image to configure the local yum

The shell script is used to add a user to delete a user's deleted files,

The shell script is used to add a user to delete a user's deleted files, #/Bin/bash # DEBUG = 0ADD = 0DEL = 0RM = 0 while [$ #-gt 0] docase $1 in-v |-verbose) DEBUG = 1 shift ;; -h | -- help) # help document echo "'basename $ 0' -- add LIST -- del

Total Pages: 541 1 .... 153 154 155 156 157 .... 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.