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
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 extensionsDescription: (1) Under Linux batch modify the file name, the command shown in the "_linux" removed.650) this.width=650; "src="
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=$[
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
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
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
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
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 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 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:
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
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
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
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 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/
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.