Syntax for the FOR loop:1. For variable in value 1 value 2 value 3 ....DoProgramDoneFor example: The following script will print 4 times respectively the value of morning noon afternoon evening1 #!/bin/bash2#打印时间 3#Author mrfeng45 for-time in
Original: Http://note.youdao.com/share/?id=cd2ad6e6d5db2b347f92958efc2bdbc1&type=noteRegular expressions and wildcard characters:First, Introduction:1. A regular expression is used to match a string in a file that matches a condition .contains
When it comes to learning about Linux and OpenStack, it's important to learn scripts well, whether it's a large-scale deployment or operation, and shell scripts are already standard.Here are just some basic notes for the Linux shell, which are noted
1. Explanation: A single string that describes or matches a series of strings that conform to a certain syntactic rule.Action object: StringMany are used in document editors or other tools to retrieve and replace text content that conforms to
CTRL key related shortcut keys:Ctrl + A-jump to the start of the lineCtrl + B-move back a charCtrl + c-terminate the command//use the most?Ctrl + D-delete from under the cursorCtrl + E-jump to the end of the lineCtrl + f-move forward a charCtrl +
Summary of this chapterVariables are a must in a very small program . The shell variable retains the string value , and a large number of operators can be ${var ...} used in , let you control the result of the variable .Shellprovides a number of
Regular expressions are primarily a grammar rule used to describe character permutations and matching patterns. It is mainly used for the pattern segmentation, matching, finding and substitution of strings, the main purpose is to match.Wildcard
Need to deploy the server itself, so after the application of space, you need to install Linux itself, install Apache, etc., so download the compressed file needs to run. On the internet to find some decompression command wrong, especially try the
#!/bin/bash### #定义screen的名字, the following installation will use screen this command screen_name= "LANMP" #根据 $UID to determine whether the user is root, must root to perform if [ $UID != 0 ]; then echo "You must be root to
The shell, known as a program that acts as an interface between the user and the Linux OS, allows the user to enter commands that need to be executed to the OS. There are a lot of shells here, just bash. 0) Shell version of the experimentShow Shell
In the shell, especially in the shell loop, some expressions may be used to operateThis requirement can be accomplished using the expr command, such as:x=$ (expr $a + 1)Completed the calculation of the sum of $ A and 1 and assigned the value to
$ who can know how many landings on the system$who |wc-l count the number of usersNote: | is a pipe symbol that can be used to establish a pipeline between two programs (pipeline): The WHO output, a WC input, the result of the WC is the number of
the Nginx service program written by Shell can be added to the/etc/init.d/directory first. chkconfig--add nginxd chkconfig nginxd on Service Nginxd Start Service Nginxd Stop service Nginxd "Restart | Reload | Test | Status " #!/bin/bash#chkconfig:-
Today learn bird's private dishes, according to the book hit a few shell script, but the total errorThe first is to use [] to determine the condition, = = does not work properlyThe second is to declare variables in the script to use declare, always
A Brief History of Unix
UNIX was originally developed by the Computer Science Research Center of Bell Telephone Laborataries, the first version of which was born in 1970 – shortly after Bell Labs withdrew from the Multics project. Among the
Linux Shell variables and linuxshell Variables
M @ meng :~ $ B = 2 + 3 m @ meng :~ $ Echo $ b2 + 3
However, the declare command can be used to set the type of a variable. Currently, only integer and array types are supported. Now, consider
Solution for shell not displaying the user name path in CentOS
In CentOS, shell-bash-4.1 $ solution to not display the user name path
Problem description:
Add a new user under CentOS. After logging in, the shell script information is as follows:
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