Shell script One-click Install LNMP Menu mode installation

#!/bin/bash#定义软件包变量tnginx= "Nginx-1.6.0.tar.gz"nginx= "nginx-1.6.0"Tcmake= "Cmake-2.8.6.tar.gz"Cmake= "cmake-2.8.6"tlibmcrypt= "Libmcrypt-2.5.8.tar.gz"libmcrypt= "libmcrypt-2.5.8"tmcrypt= "Mcrypt-2.6.8.tar.gz"mcrypt= "mcrypt-2.6.8"Tmhash= "Mhash-0.9.

Shell script Common script: For loop

 Shellscript Common script:ForLoopsWheil Many loops can be replaced with a for loopFor loop syntax structureFor variable name in variable Value listDoinstructionDoneFor ((EXP1;EXP2;EXP3))DoinstructionDoneScript instance:For 99multiplication

Shell string Processing

Shell string ProcessingGet string length ${#var}var="www.baidu.com"echo ${#var}13String Slice ${var:index:length}, ${var:index} index starting from 0echo ${var:2} //从下标为2开始,一直截取到结束w.baidu.comecho ${var:3:8} //从下标为3开始截取8个字符.baidu.cecho ${var:(-5)}

Shell Loop statement

One, for-done (not very common)1. GrammarFor variable in name table do ... done2. Script Sample Code#!/bin/shfor num in 1 2 3 4 5do echo "number is $num" done3. Execute script[Email protected]]# sh hello.sh4. Implementation resultsThe number

GNOME Shell Extension Common extensions

The main purpose of this blog post is to facilitate the installation of GNOME extensions for me and you. I've listed all the extensions I've installed here. Common extensions Clipboard Indicator https://extensions.gnome.org/

Ubuntu Terminal executes shell pin this report command not found workaround

Use sudo to perform the PIN report error:sudo: myshell.sh: command not foundCause: This happens because the script you are trying to execute requires the correct permissionsWorkaround: Execute sudo chmod a+x myshell.sh and then execute the script at

Linux system Configuration and service Management _ NO. 01 System Deployment (second section first knowledge shell)

***大家好,我是霸王卸甲,又到了今天更新文章的时间了,今天给大家带来的是第一章中的第二小节 shell语言!!*** GNU Bash Introduction: The shell is the user interface of the system and provides an interface for users to interoperate with the kernel.It receives the command entered by the user

8.10 Shell Special Symbol cut command 8.11 sort_wc_uniq command 8.12 tee_t

8.10 Shell Special Symbol Cut commandCommand: CutUsed to intercept a fieldSyntax: cut-d ' delimited character ' [-CF] n Here's n is the number-D: followed by delimited characters, separated by single quotation marks-C: followed by the first few

Shell script third--monitoring the host disk space, when the use of space more than 90% by sending mail to send a warning

Shell Script third-- Monitor the host's disk space and send mail to warn when more than 90% space is used#!/bin/bash#monitor available disk space#提取本服务器的IP地址信息ip= ' ifconfig eth0 | grep "inet addr" | cut-f 2-d ":" | Cut-f 1-d "" 'space= ' df-hp |

shell-detect if the service is running and log

Purpose: Detects whether the service is running every minute of the day, and if it is running, the name of the process being executed; if it is not running, the current time is loggedShell#!/bin/bashdate=`date

Shell Signal capture Command trap

Trap commandtarpThe command is used to perform the action after the specified signal is received, usually in order to complete the cleanup when the shell script is interrupted. For example:When the script is pressed at execution time CTRL+c ,

Shell Script Debug Print log issues

Shell Script Debug Print log issue 1. DemandWhen we write scripts, sometimes we need to do debugging, so that we can locate the problem, and sometimes when the script goes online, we need to keep the records during the execution of the script. It

Examples of ${}, #, # #,%, percent of% in the shell

DescriptionI believe that in the work, many friends in the use of shell scripts encountered ${},%, #等这些字符的使用, and occasionally they will be dizzy, and then I use the following example to let everyone very well remember the Shell ${}, # #和 percent

Shell special symbol, Wc,uniq,tee_tr_split command

[[email protected] ~]# cut-d:-F 3/etc/passwd-d: delimiter-F plus number paragraph F is the first paragraph012[[email protected] ~]# cut-d:-F 3,4,5,6,7/etc/passwd can choose a few more paragraphs plus, you

Day07_ network management, SSH, Shell, and meta-characters

I. Network management Temporarily Modify network configuration Modify IP Address Ifconfig NIC name IP address Modify DNS vim/etc/resolv.conf: Modify nameserver DNS Address

To learn the shell programming of Linux in a face

1: What is Shell??? (1) The shell is an interface that the user interacts with the kernel, and the most popular shell is now called the Bash shell(2) The shell is also a programming language (3) A system can have more than one shell, you

Spark Shell Simple to use

BasisThe shell of Spark, as a powerful interactive data analysis tool, provides an easy way to learn the API. It can use Scala (a good way to run an existing Java library on a Java Virtual machine) or Python. Start running in the Spark directory

Process Control of shell scripts

Process Control of shell scripts Process Control of shell scripts Conditional statements Conditional judgment Loop Statement For,while,until For loop While loop Until cycle

Conditions and looping statements used in shell scripts

This blog post describes the common conditions and looping statements in shell scripts:Conditional statements:650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/06/B7/wKiom1m8ytPDGg7MAAB1t9_5n8Q866.png-wh_500x0-wm_ 3-wmp_4-s_2860871127.png "

Configuration files for pipeline operators, Job control, shell variables, global variables, environment variables, and shell global variables

Configuration files for pipeline operators, Job control, shell variables, global variables, environment variables, and shell global variables Pipeline operator Pipe character "|": Use the output of the previous command as the input of the next

Total Pages: 541 1 .... 139 140 141 142 143 .... 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.