The expr command takes an arithmetic expression as a parameter, usually in the following form:expr [number] [operator] [number]Because the shell stores variables as characters, the user must ensure that the operand that participates in the
Open a text editor, create a new file, the extension sh (sh for Shell), the extension does not affect the execution of the script, see the name is good, if you write a shell script in PHP, the extension is good with PHP.Enter some
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
Download the following log and copy and paste it into your Linux, and then perform a statistical analysis:650) this.width=650; "src=" http://www.apelearn.com/bbs/static/image/filetype/unknown.gif "border=" 0 "class=" VM " Style=
usage: seq [options] ... Mantissa or: seq [options] ... First number mantissa or: seq [options] ... The first number increment mantissa Prints the number to the mantissa starting with the specified increment from the first number.
Execute command : XargsWhen find produces a list of files , It is sometimes useful to provide the list to another command .Case :$touch abc.c ERD.C oiy.c$ll./erd.c./abc.c./oiy.c$find-name ' *.c ' | RmRM: missing operandPlease try "rm--help" for more
I. DEFINITION of format[Function] Function name (){Command table}Ii. Method of InvocationFirst define, then use, direct input function name, no parentheses required ()Three, function parameter transfer methodCan be passed using positional parameters
#/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
ReferenceCase , If I want to output an asterisk (*), How do i use echo ?echo *This is certainly not possible , need to transfer the * , that is : Echo \*This leads to the concept of references . referenced by , is used to prevent Shell to interpret
1. Single-branch if condition statement1 if [conditional judgment type]; Then 2 program 3fi4 or 5if [conditional judgment]6 then 7 program 8fiPrecautions:The 1.if statement uses the fi end, and the general language uses curly
1.Shell command line writing rules:Multiple commands can be executed on a command line, but required;Long command statements can be expanded with \ on the command line2. Execute Shell Program2.1./test.sh2.2 Bash test.sh2.3 In order to compile and
1.history Save History Command 1000, history-c empty;2.! String calls the most recently used command,! Vim's most recently used vim,! N calls the last Ming ' l,!242 that begins with N to invoke the No. 242 command in history.3.alias Rename, alias h5=
Functions are the essence of the shell, and with functions and libraries, the shell handles complex problems as well as the compiler language, gravitated the importance of shell functions and libraries.1 Definition of functionRecommended UseHow to
Beijing time July 1 10:00, peanut Shell (hsk.oray.com) company issued a "Peanut Shell remote Management" platform. This platform is mainly used to manage the embedded peanut shell, such as the embedded management of the peanut shell in the Qnap Nas,
Batch deployment of application system shell scripts (Tomcat/jetty) and tomcatjetty on linux servers
Shell script for batch deployment of application systems on linux servers:
1. Replace the server address in the Code (Tomcat or jetty
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