Script name is zk_run.shPaste the following code into the zk_run.shAdd Execute permissions chmode +x zk_run.shRun the script./zk_run.sh startIf you find that zookeeper is not starting up, try adding the following line at the top of each zookeeper
Linux kernel is responsible for driving hardware, management activities and allocation/management of hardware resources and so on, so that the system to check the normal operation of the computer is really too important, so it is generally not
All kinds of monitoring scripts, memory, disk, port, URL monitoring alarm
How to monitor whether the site directory has been tampered with and how the site directory is recovered after batch tampering
How to develop various services
The fourth chapter is about the shell variable knowledge advanced and practice;The fifth chapter is about the numerical calculation practice of variables;The annex includes the source code, please download.The two chapters should pay attention to
Format: Date [options] ... [+ format]Option Description:-D,--date= string displays the time described by the specified stringFormat Description:Example 1:#!/bin/bash##1. Gets the current system time yyyy-mm-DD HH:MM:SSv_time_eq=`Date "+%f%T"'
#!/bin/SHMyPath="/var/log/httpd/"MyFile="/var/log/httpd/access.log"#这里的-The x parameter determines whether the $mypath exists and has executable permissionsif[!-X"$myPath"]; Then mkdir "$myPath" fi#这里的-d parameter to determine if $mypath
1.1. Shell BasicsBash is a language interpreter that is compatible with Bourne Shell and executes commands that are read from standard input device files. BASH is the abbreviation for the Bournae-again shell. Bash is backwards compatible with the
1. Write more comments in the script This is a recommended practice that can be applied not only in shell scripts, but also in all other types of programming. commenting in a script can help you or others to read your script
We can pass parameters to the script when executing the Shell script, and the format of the parameters obtained in the script is:$n. n represents a number, 1 is the first argument to execute the script, 2 is the second argument to execute the script,
Grammar:awk ' {command} ' filename multiple commands are separated by semicolons .awk ' begin {Command1} {Command2} End{command3} ' Note: Begin, END needs to be capitalizedCommon Variable Description:FS: Specifies the delimiter, which is the default
1. Create 100 folders in the/home folder. The folder name is a1......a100 in turn.2. Write a script. Own initiative will be under the Household folder under all files less than 5KB package into XX.tar.gz. (Hint: use LS. Grep,find and other orders.
The assignment and operation in the shell is the string processing by default, here are some special methods of mathematical operation in the shell, which can be seen later, hehe.1. Examples of error methodsAVar=1+1Echo $varThe result of the output
Precautions1) Opening add interpreter: #!/bin/bash2) syntax indentation, use four spaces, and more explanatory notes.3) Naming recommendation rules: variable name capital, local variable lowercase, function name lowercase, the name reflects the
http://blog.csdn.net/lishuhuakai/article/details/11928055#include #include#include#defineMAXLINE 80voidSetup (CharInputbuffer[],Char*argv[]) { intI, J; Char*p; I=0; for(p = inputbuffer;;p + +)/*Splits the character command for a period of time,
Find File LookupFind txt and PDF filesFind. \ (-name "*.txt"-o-name "*.pdf" \)-printFind files that start with all lettersFind. -name "[a-a]*"Find all non-txt text with negative parametersFind. ! -name "*.txt"-printSpecify the search depth to print
Time limit:16000/8000 MS (java/others) Memory limit:65536/65536 K (java/others)Total submission (s): 999 Accepted Submission (s): 434Problem descriptionperhaps The sea ' s definition of a shell is the pearl. However, in my view, a shell necklace
Some good habits of shell scripting
1. Naming rules
The script name ends with. SH, and names are as famous as possible. Here are a few of the script naming styles that are available for reference. Through the following fresh and
Definition: array= (1 2 3)Echo ${array[0]}Echo ${array[1]}Echo ${array[2]}echo ${array[*]} all elementsEcho ${array[@]} The length of the arrayArray AssignmentArray= (1 2 3) There are 3 elements in this arrayArray[3]=4 4 elements in this
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