Words do not say, start on the code, in order to lazy, the code is just a screenshot, interested friends can read after their own write, so deepen the impression.
Above is the shell script written by the younger brother. Please forgive me
This afternoon wrote a simple one-click Automatic Virtual Host shell script, the script to implement automatic configuration Nginx virtual host, automatically create FTP account, automatically create a database, users, and automatically achieve
The test command expects to find a parameter on the command line that is considered empty when the shell does not assign a value to the variable. This means that when the script is being processed, test will report the error once the script is
Shell variables in Linux $#, [e-mail protected],$0,$1,$2 meaning explanation:Variable Description: $$ the shell itself PID (ProcessID) $! What is the PID of the Shell's last running background process? End code of the last Run command (return value)
Enter HBase Shell Console$HBASE _home/bin/hbase ShellIf you have Kerberos authentication, you need to use the appropriate keytab for authentication (using the Kinit command), and then use the HBase shell to enter the certificate successfully. You
Http://kodango.com/useful-documents-about-shell$$ the shell itself PID (ProcessID)$! PID of the Shell's last running background process$? The return value of the last command that was run to check whether the previous command executed successfully.$*
This happens because the file line break you are working with is "\ r \ n" in DOS format.You can use the Cat-v file name to see if the newline character is, and if it is, the end of the line will be ^m"\ n" needs to be converted into Linux/unix
Shell control Structure: conditional structure, branching structure, cyclic structure
If, conditional structure
If expression then command table [else command table]fi you can use semicolons to combine multiple commands in one line. Therefore,
Reprint please indicate http://www.cnblogs.com/winifred-tang94/To create a shell script, start by creating a new text file, and then enter the shell command in the text file according to the Shell programming rules.There are two ways to run a shell
1.!! Command # indicates the previous outputHistory |grep #表示历史记录中的第23条! Vim #上一条vim记录Alias music= ' Cat test ' #表示别名Unalias Music #表示取消别名* #匹配一个或零个或多个字符? #匹配一个字符| #管道符号, drop the previous run result to the following commandCtrl + Z, FG, BG, Jobs
Note that the actual operation should be based on the actual situation of the script to adjust the corresponding1, installation httpdVI apache_install.sh#!/bin/bashRPM-E httpd httpd-manual--nodepsls/root/httpd*If [$?-eq 0];then # #判断是否已经下载了httpdTar
Shuffle question: Wash a pair of poker, what good way? Can be washed evenly, and can wash fast? How efficient is the order of chaos relative to a file?Chinaunix is really a place where the Shell masters are gathered, so long as you want to get the
IntroductionOften need to deal with shell commands, but there has been no systematic learning, then it will take 1-2 months to learn the shell command system, then open the magical journey of the shell command. This chapter focuses on the print
One. HDFs shell commandWe all know that HDFs is a distributed file system to access data, then the operation of HDFs is the basic operation of the file system, such as file creation, modification, deletion, modify permissions, folder creation,
echo Display in shell script with color display, echo display with color, need to use parameters-The e format is as follows: The copy code code is as follows: Echo-E"\033[Word background color; text color m string \033[0m"For example, copy the code
7-shell_ condition Operation Test and if statementThe first question to make a shell script "smart" is how to differentiate between different situations to determine what to do. For example, a warning is sent when the disk usage exceeds 95%, it can
1. View the ASCII code table
Man
7 ASCII
Many people are beginners to the concept of the ASCII code, and sometimes in order to check the ASCII value of a symbol, you may have to rummage to find the current textbook? Linux Manpage
The first part: expect explanationExpect allows us to automatically log on to remote machines, and can implement automatic remote execution of commands. Of course, if you use key authentication without a password, you can also implement automatic
1.1 Shell prompt[Email protected] ~]$If the last character is "#", it indicates that the current Terminal session has Superuser privileges. This permission can be obtained by logging in with the root user or using a terminal that provides superuser
This note is for the early ximo of the shelling Basic video tutorial, organized notes. The tools used in this note:http://download.csdn.net/detail/obuyiseng/9466056Introduction:the FSG shell is a compression shell. We use 9 ways of shelling
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