Shell Monitoring Script 1

#!/bin/sh#count memory_used_rate,disk_used_rate # @yuanwb  2015-5  #disk_used_rate #depend  on real storage place the parameter  ' Location '  need to  Alter. location=/dev/sda1disk_used_rate1=$ (df -h | grep  $Location  | awk  ' {print $5} ') free1=

Shell Monitoring Script 2

#!/bin/sh#count memory_used_rate,disk_used_rate # @yuanwb  2015-5  #disk_used_rate #depend  on real storage place the parameter  ' Location '  need to  Alter. location=/dev/sda1disk_used_rate1=$ (df -h | grep  $Location  | awk  ' {print $5} ') free1=

Shell script Implementation Tetris

Draw is to draw out the graphical interface keytest is to get the keyboard Tetris is the whole gametetris.sh#!/bin/bashapp_name= "${0##*[\\/]}" app_version= "1.0" #颜色定义iSumColor =7# total colors cred=1# red cgreen=2# green cyellow=3# Yellow cblue= 4#

Linux shell scripts use structured commands (2)

A. For commandTwo. While commandThree. Until command1.for Command Basic format1 for inch List 2 Do 3 Commands4 done1[Email protected]:~/testshell>CatFortest.SH 2#!/bin/Bash3#test forCommand4 5 forCityinchBeijing Shanghai Shenzhen Dalian6 Do7

Shell Script Fork Bomb Learning

:() {:|:&};:Just 13 characters is a bomb, used to look like a simple rote, now also know the point of the fur principle.:() in bash allow: as a function name{} function body:|:&: The function is called first, and then the pipeline calls another new

11 Simple shell programs for Linux system learning notes

Do not look at notes, for a long time do not have to forget, or you have to look at the notes often ah.A simple shell programShell Structure 1, #! specifies the shell2, #注释行3, commands, and control structures that execute the script. Step one:

Use the shell to count the number of occurrences of the Top10 URL (not found in the blog Park, special Turn)

transferred from: http://blog.csdn.net/guaguastd/article/details/8332757use the Shell to count the number of occurrences Top10 URLsCategory: Shell scripts 2012-12-19 17:17 286 people read reviews (0) favorite reports Ranking of

Shell redirection under Linux

1. Standard input, standard output and standard error outputLinux system open 3 files, standard input, standard output, standard error output.Standard input: Enter data from the keyboard, i.e. read data from the keyboard.Standard output: Outputs the

The role of the character "&" after running commands in the Linux shell

The original link is: http://blog.sina.com.cn/s/blog_963453200102uya7.html& placed after the startup parameter to set this process as a background processBy default, the process is the foreground process, then the shell is occupied, we can not do

Shell Programming Examples

1. Create 100 directories in the/home directory with a directory name of a1......a100.2. Write a script that automatically packages all files less than 5KB in the home directory into XX.tar.gz. (Hint: Use Ls,grep,find and other commands, files

Shell theory Study (iv)

Take a string slice 1. Starts with the fourth string, intercepts the string to the end of the string[Email protected] ~]# myname= "Hello myworld" [[email protected] ~]# Substr=${myname:3}[[email protected] ~]# echo $substr Lo MyWorld2. Starting

Linux system Ecshop Get the Shell method

Title:linux system Ecshop Take the shell method--2011-06-08 13:23Recently get a station, to ecshop take the shell not understand, led to go a lot of detours.nginx/0.8.54 server, MAGIC_QUOTES_GPC Open escape, a lot of pages have been

Linux manually start and stop multiple services with shell scripts

Common Scenario Description: Many services on the test server, in order to avoid excessive resource overhead to set the original service to boot does not start, only to retain some of the necessary system services, so when the need to use which

Substitution of shell variables

1 Shell Variable BasicsThe shell variable is a very "weak" variable, by default a variable holds a string, and the shell does not care what the string means. So for mathematical operations, you must use some commands such as let, declare, expr,

Bulk export of the shell script for Informatica Object

#!/bin/bash #-----------------------------------------------------------------------# Script name:inf_impobj.sh# purpose:to batch export mappings or workflows to XML files # Created by:indifferent_to# date:2014-11-26 #------------- ------------------

Customize Shell prompt

Presumably in the command-line mode for a long time, all look tired of that monotonous and ugly cue, the individual think also accounted for some bit, if the command long words will break.Want to change intoCD ~/touch bash_profilevim.

The shell checks the IP usage in the network segment and counts

#!/bin/bash# Beijing Linux Technology Exchange Group: 76109360n=0s=0for ((i=1; I /dev/null; Then Echo-e "\033[31m192.168.1. $i yes\033[0m" Let n= $n +1 else Echo-e "\033[32m192.168.1. $i No 33[0m "Let s= $s +1 fidone echo" $n Yes, $s no "Note: The

Linux shell If Judge times not found error resolution method

Recently a project needs to write a Linux shell script, in the Linux specified directory to traverse the *.sql file, if any, execute the file (inside the file is an UPDATE statement), when traversing the folder always reported a [Sql:not found error,

Shell script programming (merge and sort) and shell script Programming

Shell script programming (merge and sort) and shell script Programming #! /Bin/bash # shell script sort by merging a = (1 3 5 7 9) B = (2 4 6 8 10 12 14) c = n = 5 m = 7i = 0j = 0 k = 0 while [$ I-lt $ n-a $ j-lt $ m]; doif test $ {a [$ I]}-gt $ {B

Linux Shell script introduction Reading Notes Chapter 1 test and test

Linux Shell script introduction Reading Notes Chapter 1 test and testI. Introduction 1. Bash (Bourne Again Shell), which is currently the default shell environment for most GNU/Linux systems. All commands are input and executed in the shell terminal.

Total Pages: 541 1 .... 271 272 273 274 275 .... 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.