The shell traverses the folder and executes the command

Background:There is a source package that contains many subdirectories and makefile, and the packed package is too large to be deleted and then packaged by all the binaries created by make.Demand:Therefore, make clean is required to clear all the

Shell script--DHCP Automatic deployment

For more information, refer to:(iii) Play with Me Linux Network service: master server configuration for DHCP service configuration1#! /bin/Bash2ipsag="10.10.10"3dnsip="10.10.10.10"4dn="ns.gr.org"5Cat >/etc/dhcpd.conf 6ddns-update-style

Zookeeper Cluster shell operations

1.zookeeperZookeeper can be used to ensure data transaction consistency between the data in the zookeeper cluster2. Start the cluster and checkStart on each machine separately./zkserver.sh StartCheck Status./zkserver.sh Status3. Client starts shell

Shell implements a simple process monitoring script

A simple requirement: the shell implements the process monitoring watchdog function, with the scheduled task to execute a shell script every minute, monitor the process, if the unexpected interrupt then start him, if normal, do not need to do

Memo a few useful shell scripts

(1) under the shell, operate the Hadoop directory, batch name or delete, the final command sed the regular greedy replacement, look at the following script:Java code # traverse the file name under the Hadoop directory for line in ' Hadoop

The Linux Shell "requires an integer expression here"

#! /bin/bashclearfunction verify{ If [$1-eq "Bob"] && [$2-eq "555"] then echo "verified" else echo "rejected" fi}verify Bob 555Run-time occurrence (integer expression required here) errorThe reason is a small error:"-eq" to compare

Reference usage description for shell scripts

#!/bin/bash#演示全引用和部分引用#双引号和没引号的区别variable1=2010echo "$variable 1"echo $variable 1variable2= "x y z" # #字符之间用多个空格隔开echo "$variable 2" # #双引号echo $variable 2 # #没引号#单引号和双引号的区别echo "$PWD is the current directory." # #双引号Echo ' $PWD is the current

Automatically implement Hadoop decommission shell script version

IntroducedBefore I had a blog post that describes how to automate Hadoop decommission with Ansible playbook, this article describes using shell scripting.The scripts are placed on the springboard machine, and the remote server calls the local script

Operator differences for Shell numeric and string comparisons

Numerical comparison:N1-eq n2 Check if N1 equals N2 n1-le n2 check N1 is less than or equal to N2N1-ge n2 Check if N1 is greater than or equal to N2 n1-lt n2 check N1 is less than N2N1-GT n2 Check if N1 is greater than N2 N1-ne N2 check N1 is not

Shell traverses each line of the file

Because the use for to read in the file line, will automatically put the space and newline characters as the same delimiter, because when there are spaces in the line, the output will be very messy, so ...Cat Input.txt |while Read line> Do> Echo

Shell Learning Notes (i)

1.1) Integer calculation:(1)$ (()): for mathematical calculationsecho $ ((3+3))(2)Expr: There must be spaces on either side of the operator, if $[] is included, you do not have to consider whitespace issuesExpr 2 + 22) floating point calculation:BC

Settings for Shell script colors

echo display in script with color display, echo display with color, need to use parameter-EThe format is as follows: Echo-e "\033[word background color; text color m string \033[0m"For example: Echo-e "\033[41;36m something here \033[0m" where 41 of

Shell theory Learning (I.)

Login Host: Native Login (7 interface Tty1~tty7) Text Interface (TTY1~TTY6) Graphical Interface (TTY7) Telnet wildcard characters: *: Represents an arbitrary string, which can be an empty string

Shell script programming (merge sort)

#!/bin/bash#shell Sorting of Scripts a= (1 3 5 7 9) b= (2 4 6 8) C=n=5m=7i=0j=0k=0while [$i-lt $n-a $j-lt $m];d OIF test ${a [$i]} -GT ${b[$j]};thenc[$k]=${b[$j]}j=$ (($j + 1)) k=$ (($k + 1)) elsec[$k]=${a[$i]}i=$ (($i + 1)) k=$ (($k + 1))

Shell script sort (bubble sort)

#/bin/basha= (9 0 345 1 2 1 0) #自己定义一个数组temp =for ((i=0;iThe above is sorted by a custom fixed array, the following is the user-defined input array to sort.#/bin/basha= ' expr $# + 1 ' #expr是一个计算操作, $ #是参数个数, $#+1 is because there are no storage

Shell programming oracle10g installation preparations before rhel6.4, oracle10grhel6.4

Shell programming oracle10g installation preparations before rhel6.4, oracle10grhel6.4 OS: rhel6.4 Oracle: 10.2.0.1 Because oracle10g has been released for a long time and many packages used for 10g have been updated to a new version, many strange

Shell script programming (quick sorting)

Shell script programming (quick sorting) #! /Bin/bash # implementation of fast sorting in shell script programming (using the rightmost element as the element) a = (8 5 10 3 2 93 4 1 2 3 40 9 61 8 6 29) # a = (0 0 0 0 1 2 3 3 4 4 8 28 30495 921 43716

Linux shell and shell

Linux shell and shell -------------------------------------- shell application tips ------------------------------------ command completion: tab key completion shell command 2: clear or ctrl + l clear screen ctrl + u clear all the content before

Introduction to Sed Regular Expressions in Linux shell scripts, shellsed

Introduction to Sed Regular Expressions in Linux shell scripts, shellsedSed IntroductionSed is a lightweight stream editor, short for stream editor. Sed is also called a row editor because it is used to edit a file in a behavior unit. It can

Shell script programming 2

Shell script programming 2 Custom environment variables (global variables) Set Environment Variables If you want to set environment variables, you must use the export command after assigning values to the variables or setting the variables, declare

Total Pages: 541 1 .... 528 529 530 531 532 .... 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.