Shell script Bulk Build configuration file

If you manage a large number of sites and servers, it is quite painful to modify the configuration file every time. So I thought of using shell scripts to generate bulk configuration files and configuration data. The following script is a shell

Shell script Programming

1. Write the shell script, calculate 1-100 's and;#!/bin/bashsum=0;for((i=0;i100$sum$i ))}echo$sum2) Write the shell script, ask to enter a number, and then calculate from 1 to the input number and, if the input number is less than 1, then re-enter

Linux shell directives such as-D,-F,-E, and other judgment expressions

Source:http://zhidao.baidu.com/question/322131711.htmlFile comparison Operators-e filename true if filename exists [-e/var/log/syslog]-D filename True if filename is a directory [-d/tmp/mydir]-F filename True if filename is a regular file

Shell Script-1

.: Denotes any character*: Matches the previous character, A * indicates: 0 or more A+: Matches the preceding character to represent 1 or more preceding characters?: matches the preceding character to represent 0 or more preceding characters#!

Shell Learning 1

1.history Save History Command 1000, history-c empty;2.! String calls the most recently used command,! Vim's most recently used vim,! N calls the last Ming ' l,!242 that begins with N to invoke the No. 242 command in history.3.alias Rename, alias h5=

Shell script obtains native IP address

Tag: IP address #!/bin/bash#author: #date: 2015-6-13#filename:ip.sh############################ #ifconfig_cmd = ' which  Ifconfig ' $ifconfig _cmd > ifconfig.me################################## #function  obtain_ip_ Information () { if grep -q  '

Logical judgment in the shell

[Condition 1-a Condition 2] When 1 and 2 are true [condition 1-o condition 2] when 1 and 2 one is true [! condition] Take counter && and | |   Or! unsigned [-D name] && Echo ' is dir ' is true when the name is directory, then the input has the

Shell logical comparison character

1. Value Format: Test "NUM1" OPR "num2" ["Num1" OPR "num2"] OPR Value: Equality:-EQ Unequal:-ne

Shell script checks Tomcat run state

path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/mysql/binexport  Java_home=/usr/java  export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar   export path= $PATH: $JAVA

The sleep statement of a shell statement

Sometimes a shell script is written to execute a sequence of programs. Some programs do not exit immediately after they are stopped, such as a tomcat hanging, even if the kill-9 command is not instantaneous.So if the shell does not wait for it to

Pipeline commands for Bash Shell

1.Cut: Command Select cut-d ' delimited character '-F fields-D: followed by delimited characters, used with-f-F: Cutting a piece of information into several segments according to the delimited character of-D-C: Remove a fixed character range in

Shell character intercept command awk

awk command# awk ' Condition 1{action 1} Condition 2{action 2} .... ' FilenameGeneral use of relational expressions as criteriaAction: 1, formatted output 2, Flow control statement column that handles the cut command cannot intercept spacesExample:

Shell Regular Expression

basic regular expression metacharacters role * matches the previous character 0 or more times . match any character except newline

Shell Script (v)

Shell Script (v)4. Sed and awk(1) SEDA, common parameters#文件编辑工具, text files and standard input can be edited, the standard input is keyboard input,#文件重定向, string, variable, and pipe text.#-n: Do not print all rows to standard output;-e: Resolves

Shell Review notes----User management

$ who can know how many landings on the system$who |wc-l count the number of usersNote: | is a pipe symbol that can be used to establish a pipeline between two programs (pipeline): The WHO output, a WC input, the result of the WC is the number of

First shell script

Http://c.biancheng.net/cpp/view/6998.htmlOpen a text editor, create a new file, the extension sh (sh for Shell), the extension does not affect the execution of the script, see the name is good, if you write a shell script in PHP, the extension is

Automatically download the source code _ and Compile _ package _ deployment _ Restart the service shell script

svn

The various operating meanings of the shell in this, can refer to my three years ago this

Shell Login Remote Server

More field servers, password 3 months expired, at the expiry of the need to change the password.Write with expect, try to log in 2 times after the exit (Prevent password error when the account lockout), time-out retry.The shell script calls and

SHELL script-1, shell-1

SHELL script-1, shell-1 .: Represents any character *: Matches the preceding character. a * Indicates zero or multiple. +: Match with the previous character to indicate one or more previous characters. ? : Matches with the previous character to

Shell script to delete the folder N days ago ----- the difference between the date command on linux and mac

Shell script to delete the folder N days ago ----- the difference between the date command on linux and mac Background:Every day you build things and put them in different folders by date. For example, today's construction is put in, tomorrow's will

Total Pages: 541 1 .... 485 486 487 488 489 .... 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.