Shell Script SMS Monitoring script (disk, CPU, etc.)

Under BinVim sms_monitor.sh#!/bin/bashCD ' DirName $ 'timestamp= ' date + '%F%h:%m:%s 'Disk_flag=falseInode_flag=falsePing_flag=falseCpu_flag=falseIowait_flag=falseSms_flag=falseDisk_over= ""Inode_over= ""Ping_over= ""Cpu_load_average_over= ""Iowait_

Preliminary shell script programming

Programming is the process of writing program source code using human natural language or machine language. This is what we all know, because it, after all, has programmed what student performance management system, library management system. Wait a

Pipe and job control, shell variables, environment variable profiles

Pipe characterIt is used for the output of the previous instruction as input to the latter instruction.650) this.width=650; "src=" Https://s5.51cto.com/oss/201711/16/1d984a59004a96e2f826e971888f9636.png "title=" Clipboard.png "alt="

Shell special symbols, cut_sort_wc_uniq commands, and Tee_tr_split commands

Shell Special Symbols * Any of any characters ? Any one character # comment Characters \ de-Semantic characters | Pipe character $ variable prefix,!$ combination, regular inside means end of line ; Multiple commands

3 ways the shell reads files by line

the shell reads files by line There are many ways to do this, and here are three ways to write:Writing one:#!/bin/bash# Description: # while loop read Line operation # Author: Lone Boat Dot # version:1.0#创建时间: -one- Geneva:

Shell Script debugging

1. Use the Dos2unix command to process scripts developed under WindowsThe following scenarios for placing scripts under Windows for editing under Linux are as follows:[[email protected] ~]# cat-v nginx.sh #!/bin/bash^Ma=1 n^Msum=0 ^ M while ((a 0

Loop syntax in the shell

Loop syntax in the shellYun ZhengjieCopyright Notice: Original works, declined reprint! Otherwise, the legal liability will be investigated.A. For Loop1. Syntax format 11 for inch Value 1 value 2 value 3 ... 2 Do 3 Source Code 4 Done   2. Syntax

Talk about how the Shell learns.

Frozen pottery mu Fpniy advised surname Xin http://weibo.com/u/6195707793Cang Chen Rao y2b0i apricot Jia Unitary http://www.docin.com/app/user/userinfo?userid=180238445Rabar 579QH http://tushu.docin.com/srfm596The i5szn of white Eclipse and the http:

A small way to get key/value in a file from a shell script

There are n kinds of methods, awk, sad, grep, cut ...The above several ways do not write, just write two less commonly used to.Say less nonsense, directly on the code:Cat a.txt aa.gif=aaaa.gifbb.gif=bbbb.gifcc. gif=cccc.gifMethod One:#!/bin/sh while

Shell Script "$ ()", "${}" learning

The difference between $ (()) in the shell and $ () and ${}Http://blog.chinaunix.net/uid-14351756-id-2820651.html$ () and ' (back quotes) in the bash shell, $ () and "(anti-quote) are used to do command substitution.The so-called command

CTF game Linux file monitoring and recovery shell

Before participating in the CTF competition when the temporary write, there are a lot of shortcomings, but can be used, put it out to share to everyone, hope to help everyone.Script one: Record the current directory situation#!/bin/bashfunction

Shell Exercise 01: List the commands that are most used and enter them into Chy1.txt

Requirements: List which commands are most used and enter them into Chy1.txtIdea: Our command is all there is a history file/root/.bash_history This file, you need to sort the commands used

Shell Start-Stop script

To list any process listening to the port 8080:lsof-i:8080To kill any process listening to the port 8080:Kill $ (Lsof-t-i:8080)or more violently:Kill-9 $

Shell script Beginner's Exercise Chapter

Shell script Beginner's Exercise Chapter650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9F/7B/wKioL1mdXkfDFzntAAAXoHD3udQ741.png "title=" Images.png "alt=" Wkiol1mdxkfdfzntaaaxohd3udq741.png "/>Script 1  Function: Create 10 1M

Parentheses in the Shell function

One, parenthesis, round brackets () 1, single parenthesis () ① command group. The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script.   Multiple commands in

Linux shell online text editing sed

sed command file editingsed is a text editing command that reads file data through a terminal into a buffer, then edits text through SED, and in the output to the specified file, sed is a stream editor, which is a very useful tool in text processing,

The while loop of the shell loop structure

While loop1)While CONDITION; DoStatementStatementDoneWrite a script that calculates 1---100 of the AND#!/bin/bash#Sum=0I=1While [$i-le 100]; DoLet sum= $sum + $iLet i= $i +1DoneEcho $sum2)While true; DoStatementStatementDone#!/bin/bash#While true;

String manipulation in the shell

Shell string manipulationThe bash shell provides several commands for string processing: awk command Expr command String length ${#..} Length of expr Length of awk (s)Instance:string= "Hello World"$ {#string}Expr

Linux Common Command Collation (iv): package Management and 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

The Windows platform is a shell environment that simulates Linux

In the Linux platform simulation of the Linux shell environment, can be implemented by a software: Cygwin (click to enter the official website to download), such as (select the corresponding version to download):    Installation:1. Double-click the

Total Pages: 541 1 .... 127 128 129 130 131 .... 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.