Shell script to write Nginx deployment script

The following is a script for the installation and modification of nginx.conf scripts written by the shell script, which is relatively simple:#!/bin/bashfunction Yum_install () {Yum Install Epel-release-yYum Install

Linux Common Command Collation (v): Shell Basics

Hello everyone, I'm a singing program, ape ~~~~~~.Recently in the study of Linux, spare time on these basic commands to organize, I hope you can use, the purpose of the finishing is to forget when the turn out to see ^?_?^, before and after a total

Shell practice: Using the For loop to bulk modify file name extensions

Shell practice: Using the For loop to bulk modify file name extensionsDescription: (1) Under Linux batch modify the file name, the command shown in the "_linux" removed.650) this.width=650; "src="

Shell scripts (ii) Mathematical operations

directly on the code.#!/bin/Bashno1=4NO2=5Echo "using let ..."Let result=no1+NO2Echo "result is: ${result}"Let result++Echo "result after 1 increment is: ${result}"Let result+=6Echo "result after 6 increment is: ${result}"Echo "using [] ..."result=$[

Shell Programming Learning notes-integer self-increment

In a shell script, the case of integer self-increment is often involved in a while or for loop, and the following is a list of possible ways " Way One "declare-i to declare an integer variable [Email protected]:~# declare-i x=1

Linux--shell Programming (vi) using scripting options and combination condition testing

Write a script:1. Add 10 users user1 to User10, password with user name, but only if the user does not exist to add;#!/bin/bash# forIinch{1..Ten}; Do if!IDUser$i &>/dev/NULL; ThenUseradd user$iEcho "user$i"|passwd--stdin user$iElse Echo

Shell generates a random password

One of the great advantages of the Linux operating system is that you can use up to hundreds of ways to implement it for the same thing. For example, you can generate random passwords in dozens of ways. This article describes 10 ways to generate a

Linux Shell Exercise Training

Shell Exercise Training Sum of 2 numbers Calculates the 1-100 and Change the extension of all files in a directory to Bak Compile all. c files in the current directory: Print root can use the number of executable files to process the

Lets you quickly learn shell scripts

A shell script is a function that uses the Shell's command interpretation to parse a plain-text file and then perform these functions, or it can be said that a shell script is a collection of commands.The shell can be used directly above the

Shell Script--LNMP Architecture-real-combat deployment

shell Script Combat----One-click Deployment LNMP ArchitectureLNMP uses the shell to deploy, directly on the topic, first needs to prepare the package files, which I named here as Zhunbei files.650) this.width=650; "Src="

Shell scripts-Simply add users and count the total number of users

Script Name: Test4.txtCd/optmkdir SHELLLSVI Test4.txtThe script reads as follows:#!/bin/bash[! $#-eq 1] && echo "Args is Error" && exit 5id &>/dev/null && echo "User $ exist "&& exit 2id &>/dev/null | | Useradd $1id $ &>/dev/null && echo "$"

Shell variable input read explain and combat

Shell variables can be directly assigned to a value or script, you can also use the Read command to get read as built-in commands from a standard loser help read view[Syntax format]Read "parameter" "Variable name""Common parameters"-P Prompt:

Shell Script Learning Note 10: Shell input and output redirection

command > file redirects the output to file.Command redirects the input to file.command >> file redirects the output to file in an append manner.n > file redirects the file descriptor n files to filename.n >> files redirect files with file

Shell scripts automate interactive input by sending a \ n string or expect script

Writing a shell script inevitably encounters the steps that require interactive input instructions:Method One:# Cat Action.sh#!/bin/shRead-p "Enter Number:" No;Read-p "Enter Number:" Name;echo you have entered $no, $name;# sh action.shEnter

A shell script that gives your Linux command line a cool look

#!/bin/bash# Modify showed marked## biaoshi.sh 207# by Wangxianzheng 2011/12/20path=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/ X11r6/bin:/root/binecho "####### #execute $ begin...##########

Hadoop 2.7.3 Shell

[Email protected] ~]$ HDFs dfs-helpUsage:hadoop fs [Generic options][-appendtofile ... ][-cat [-IGNORECRC] ...][-checksum ...][-CHGRP [-R] GROUP PATH ...][-chmod [-R] PATH ...][-chown [-R] [Owner][:[group]] PATH ...][-copyfromlocal [-f] [-P] [-l]

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

Linux Shell Text Processing tool Highlights

This article describes the most common tools for using the shell to process text under Linux:Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk;The examples and parameters provided are the most commonly used and most practical.I use the

JavaScript uses the Wscript.Shell object to execute the. bat file and the cmd command

JavaScript uses the Wscript.Shell object to execute the. bat file and the cmd commandHttp://www.cnblogs.com/ZHF/p/3328439.htmlWscript.Shell (Windows Script Host Runtime Library) is an object and the corresponding file is c:/windows/system32/

Total Pages: 541 1 .... 164 165 166 167 168 .... 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.