When writing a script (Shell), you will often encounter the path name, file name, and so on in the filename including the full path.
This includes a full path file named
/usr/local/apach2/etc/httpd.conf
Defined as
File=
In the hint: many of the translation of Ubuntu is literal literal translation, there are many problems, so I suggest you refer to my explanation here. Of course, it was also some of the suspicion of the text, I hope.
Often operate on Linux, have a
1. When a string is used more frequently in a script and the string length is long, you should use a variable instead2. Variables are essential when using conditional statements3. When referencing the result of a command, replace it with a variable4.
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
In a structured command, the most basic type is the If-then statement if Commandthen Commandfibash the Shell's if statement executes the IF line definition of the command, and if the exit status code of the command is 0, then the command in the then
These eight recommendations come from some of the experience and lessons learned by key writers in writing shell scripts over the years. In fact began to write the time is not only these several, and later thought repeatedly, remove a few irrelevant,
Security code: Waves will sometimes, straight hanging cloud sail sea Shell scripting App (iii)Foreword: It is difficult to write all the code in sequential order when it is hard to satisfy the requirements when facing various lists and repeating
Linux Shell gets time and time interval (MS level)Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test
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
Transfer from http://www.cnblogs.com/aaronwxb/archive/2011/08/19/2145364.htmlWriting a script yesterday took 2/3 of the day, and most of the time spent on the SED command, today do not summarize the time of yesterday, I'm sorry.There are several
Recently relatively busy, in the company wrote a Centreon+nagios platform source automatic installation script (because the company can not even outside the network, the company Yum source a lot of things are not all, so can only take the source
assignments and operations in the shell are string-handling by default, and here are a few special ways to do mathematical operations in the shell. In the future when you can see, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the
1. More friendly display of the currently mounted file system
Mount | column-t
This command applies to any file system, and column is used to format the output as a list, and the main purpose here is to familiarize you with the usage of
1, guess the number: first let the system randomly generated a number, give this number to a range (the number of the first 50 and 50), let the user input guess the number, the input judgment, if not meet the number to give high and low hint,
The anti-quote bit (') is located above the TAB key of the keyboard, to the left of the 1 key. Note the difference between the single quotation mark (') on the left side of the ENTER key.Plays the role of command substitution in Linux. Command
Tilde expansion with wildcard characterstwo types of expansion in the shell that are related to file names . The first one is the wave number expansion . , The second type is a wildcard expansion .Wave Number expansion If the first character of the
Shell generates a specified range of random numbers and random stringsCategory: Shell 2014-04-22 22:17 20902 People read Comments (5) favorite reports ShellrandomurandomuuidlinuxShell generates a specified range of random numbers and random strings1.
If condition judgment1. Basic syntax:if [command]; ThenStatements that meet the criteria for executionFi2. Extended syntax:if [command];thenStatements that meet the criteria for executionelif [Command];thenStatements that meet the criteria for
Defining functionsFunction name {Functional body of a function......}Function name () {Functional body of a function......}How to call a functionName of functionWhat are the rules for using functions?1) first defined and then called, you can only
Install the SSH secure Shell under Windows. There are two shortcuts after the default installation.Need to install Openssh-server under LinuxUtuntu installed by default opens is-client, so do not need to install, but if not installed, then use
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.