Shell script Batch Start zookeeper

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

Powerful and usable shell

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

Operations engineers must master the actual shell technology content

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

To provide the old boy learn Linux OPS Shell programming in the fifth chapter of the source code

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

Shell Date Command Detailed

  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"'

Whether the shell's judgment file exists

#!/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

First, the Linux Shell Foundation

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

Shell Scripting Normalization, standardization

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

shell--3, Shell Pass parameters

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,

Shell awk Command

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

Shell automatically checks SSH brute-force IP and blocks attacks

#!/bin/bashlocal_ip= "192.168.0.4" #定义本地IP不会被拒绝tmp_log= ' Mktemp 'Cat/var/log/secure |grep "Failed password for root from" |awk ' {print $11} ' |uniq-c > $tmp _logCat $tmp _log |while Read lineDoAttack_num= ' echo $line |awk ' {print $} 'Attact_ip= '

Shell Programming Examples

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.

Shell numerical calculation

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

Shell Test Statements

Test statement format: [conditional expression] Subdivision Test statements are: File test, logic test, integer value comparison, String comparison------------------------------------------------------------------------------------file test:

The 12th Chapter shell script Writing and common face question (i.)

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

Simple shell implementation

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,

Several commonly used text-processing shell commands: Find, grep, sort, uniq, sed, awk

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

HDU5730 Shell Necklace

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

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

Use of shell arrays

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

Total Pages: 541 1 .... 261 262 263 264 265 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.