Linux script (shell) programmingAh, yesterday on the Internet to see an article about Linux/unix shell, think of their last write this thing is also a year ago, think about it is almost forgotten.or tidy up, do a review, it may be used in the future,
Replace: If the expression contains special characters, the shell will replace it. For example, using a variable in double quotes is a substitution. The escape character is also a replacement#! /bin/Basha=tenecho"Value of A is ${a} \ n"The #-e
1. installation files Rhel5.1-server-20071017.0-i386-dvd.iso2. Directory structure/bin: Store Common commands/boot: Store startup program/dev: Store device files/etc: Store startup, shutdown, configuration programs and files/home: User work root
In php, there are many ways to traverse arrays, such as foreach, each, list, and for. However, in these ways, foreach provides the best array traversal performance, so I also use it frequently, next I will introduce the handler foreach to traverse
Ask simple code questions. The following code output is confusing. the code result is $ value & quot; 100 & quot; bool (true) $ valuetrue. the code is as follows: $ value & quot; 100 & quot; define the character variable as 100 echo & quot; $ value &
{Code ...}
Foreach ($ arr as $ value) {$ value = preg_replace ("/href = \" \ // I ", 'href = "'. $ link, $ value); echo $ value.""; // Here $ value is the value after replacement. } Echo $ arr [1]; // The value displayed here is still the value of $
The foreach syntax structure provides an easy way to iterate through an array. foreach can only be applied to arrays and objects, if you try to apply a variable to another data type, or an uninitialized variable will emit an error message. There are
Similar to filtering, multiple validation rules are added consecutively. If all rules are expired, true is returned. If one of them is not OK, false is returned.
First, instantiate a class for zend_validate, and then add the validator to the
Note: No space is allowed between the left and right sides of "=". The semicolon program 1 # is not required at the end of the bash statement #! /Bin/sh # echo somethingecho "Hello World" Echo "Hello !! "CD/root/export topmkdir./ABC Program 2,
In the php user-defined menu, I applied for a public platform test account, which has passed verification before. after paying attention to it, I sent a message to the test account to get the correct response from the test account, the custom menu I
Shell: Shell Process Control details, shell Process Control detailsShell: Shell Process Control details if else
If statement
Syntax:
if conditionthen command ...fi
Eg:
#!/bin/basha=100b=100if [ $a == $b ]then echo "$a == $b"fi
Output:
100 ==
In php, there are many ways to traverse arrays, such as foreach, each, list, and for. However, in these ways, foreach provides the best array traversal performance, so I also use it frequently, next I will introduce
In php, there are many ways to
Phpforeach array traversal usage introduction. In php, there are many ways to traverse arrays, such as foreach, each, list, and for. However, in these ways, foreach provides the best array traversal performance, so I also use it frequently, in the
Ask simple code questions. The following code output is confusing. the code result is $ value & quot; 100 & quot; bool (true) $ valuetrue. the code is as follows: $ value & quot; 100 & quot; define the character variable as 100 echo & quot; $ value &
First script file
Copy Code code as follows:
#!/bin/bash
echo "This are my I-A-bash code!"
Exit 0
redirect Symbols and mathematical calculations
Copy Code code as follows:
#!/bin/bash
Echo-n "The time and
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.