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