This article from: http://www.cnblogs.com/puresoul/p/5092628.htmlPrevious jmeter Bean Shell Use (a) a brief introduction of the bean shell in the next jmeter, this article is a supplement to the above, the main summary of the several commonly used
the speed of software development exceeds that of any one industry. Software practitioners have climbed, and software users have gone deep into the countryside (using smartphones to watch programs and chat videos). 1 Linux and Shellas a user of
echo-n non-newline output$echo-N "123" $echo "456" final output 123456 instead of 123456 echo-e handling special characters if the following character appears in the string, it is handled in particular, not as a general text output: \a a warning; \b
Mainly includes the following 3String manipulationMathematical operationsFloating point ArithmeticOne. String manipulationConnection of StringsConnection Word 2 strings do not need any connectors, write next to each otherLength acquisition Expr
About SEQThe SEQ command is used to generate all integers from one number to anotherseq 1 5 Output 1-512345seq 5-1 1 Reverse Output 1-554321[[email protected] ~]# seq 1 2 //output 1-10 and output once every two digits 13579seq 9-2
Special variables:$?: The execution result of the previous command returns a value of 0-255,0 for execution success, and other values indicate unsuccessful execution$!:shell PID of the last running background processPID of the $$:shell itself$:
Linux Shell Advanced Tips (i)Http://www.cnblogs.com/stephen-liu74/archive/2011/12/22/2271167.htmlFirst, the input information is converted to uppercase characters before the condition judgmentSetting output level for debug informationThird, judging
Similar to other programming languages, the shell supports A for loop.The general format for A for loop is:For variable in list do Command1 command2 ... CommandndoneA list is a sequence of values (numbers, strings, and so on), each
Case ... Esac is similar to the switch ... case statement in other languages, and is a multi-branch selection structure.The case statement matches a value or a pattern, and if the match succeeds, the matching command is executed. The case statement
Generating random numbers in Linux can use the $random variable.The Man Bash command looks at the explanation of the random.Random each of the parameter is referenced, a random integer between 0 and 32767 is generated.As you can see, the $RANDOM
Linux Shell intercepts strings
There are many ways to intercept strings in the shell${var#*/}${var##*/}${var%/*}${var%%/*}${var:start:len}${var:start}${var:0-start : Len}${var:0-start}
Here are a few examples to illustrate:1) Get the
Scripts are afraid of problems before they are executed. Linux provides no need to judge if there is a problem by directly executing the script.[Email protected]]# SH-NVX scripts.shParameters:-N Do not execute script, only check for syntax issues-V
Anti-counterfeiting code: Learning without thinking is blind, thinking and not learning is dangerous Test disk alert scripts with Xshell1. Open a centOS6.5 virtual machine and change the network adapter to bridge mode.650) this.width=650; "Src="
1. Bash = Bourne Again SHell2. Terminal prompt:#普通用户 [email protected]$ #管理员用户 [email protected]#3. The shell script is usually a text file that starts with Shebang:#! /bin/bashShebang is a line of text where #! is before the interpreter path.
Error:/usr/local/bin/stop.sh:line 3: [: 2151:unary operator expectedReason:The shell script name is stop_tomcat.sh and will never be executed else because the script itself contains the Tomcat,shell script to find out Stop_tomcat This process is the
OperatorsThe shells use arithmetic operators from the C programming language, in decreasing order of precedence. Math Operators
OPERATOR
DESCRIPTION
++−−
Auto-increment and auto-decrement, both prefix
Linux+shell Administrator's Good helper--batch decompressionRecently, the company has been busy with OA on-line work, as an administrator, it is necessary to provide them with data backup and recovery operations, the main operation is to restore the
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