Shell generates a simple format XML instance _linux shell

Here's the shell code:create_xml.sh Copy Code code as follows: #! /bin/bash #author: Dengzhaoqun#date: 201202/14 Outfile=outTabs=0 Put () {Echo ' ' >> $outfile} Put_head () {Put '? ' ${1} '? '} Out_tabs ()

Extract Oralce-day alert log shell script code _linux Shell

Shell script to extract alert log for Oralce day Copy Code code as follows: #/bin/sh #get Alert of Everyday #then name of file is everyday_alert.sh Dir= "/oracle/admin/bbdz/bdump" num=$ (cat-n ${dir}/alert_bbdz.log | grep "'

Shell common operator Summary _linux shell

First, the arithmetic operation Copy Code code as follows: +  -  *    /    % second, the relationship operation Copy Code code as follows: >= Third, the test operation Testing command: Test [] [[]] [(

The For loop summary in the shell _linux shell

About the shell in the for loop usage a lot, always want to sum up, today on the Internet to see a summary of the use of the loop, feeling very comprehensive, so turn around research, HEI ... Copy Code code as follows: For

Shell version Nginx log spider crawl View script _linux Shell

Shell version Nginx log spider crawl View script Change the path of the Nginx log before usingIf more spiders themselves in the code Spider UA array Riga can #!/bin/bash m= "$ (date +%m)" Case $m in "") m= ' before ';; ") m= ' Feb ';; "

A method instance for canceling redirection in a shell script _linux shell

In the previous example of Shell programming, it was mentioned that the shell script was extended and redirected to a file for viewing and debugging http://www.jb51.net/article/62435.htm. However, if there is another situation: redirect only in some

Shell script automatically deletes backup files above a specified size _linux shell

The recent local virtual machine space is always backed up to fill, in order to lazy don't want to log up every day to clear, just write this automatic cleanup script. System: CentOS 5.x Script content: Cat make_room.sh Copy Code code as

Shell script implements bulk replacement file content _linux Shell

Today colleagues found that the internal server's hard disk space is not enough, there are many backups, I can not delete, and found a 320g hard disk mounted, want to later the shell script backup to the new hard disk, to make room for the old hard

Shell Implementation TR Delete replacement detailed _linux shell

The TR (translate abbreviation) is used primarily to remove control characters from files or to convert characters. Syntax: TR [–c/d/s/t] [SET1] [SET2] #SET1: Character Set 1;set2: Character Set 2-c:complement, replace the characters except SET1

Introduction to the position variables of special variables in shell programming _linux shell

1. Get the file name of the current script, including the path. Copy Code code as follows: #写一个测试脚本 Vim test.sh #内容如下 Dirname$0 Basename$0 #执行一下 bash$ (PWD)/test.sh #输出如下 /home/jane test.sh 2. $n get the

Shell scripts traverse directories and bulk modify file encoding _linux Shell

When porting JSP pages on Windows to a Linux environment, it is too slow to find a transform encoding and modifying the default encoding type, write this script to attempt file traversal ~ Long time no write, Rusty. Copy Code code as

A simple shell script sharing _linux shell that monitors squid running processes and automatically restarts

Copy Code code as follows: #!/bin/sh While Sleep 30 Todo Squidnum= ' Ps-ef|grep squid|grep-v grep|wc-l ' #HttpNum = ' netstat-an|grep 0.0.0.0:80|grep-v grep|wc-l ' #80状态 If [$SquidNum!= 3]; Then /etc/rc3.duid start Adddate= '

Linux Modify directory and file permissions simple command to explain _linux shell

Problems encountered today, how a user such as WWW permissions replicated to my users? Permissions for the directory representation: dwrxr--r-- Where the first character d represents the directory,-representing the character w is writable, and R

Linux automatic cleanup log script sharing _linux Shell

1. A streamlined script for automating the deployment of systems, with the main function of cleaning up all directory logs 2. According to the given log directory, delete time combined with crontab to clean the log, clean up after completion, after

Shell script Implementation Delete mail queue _linux shell

Recently encountered a problem: The machine mail queue is always stuffed, but do not know where to send mail written, very egg pain, no way, only temporary treatment, wrote a delete mail script rm_mqueue.sh. Copy Code code as follows:

Shell script implementation detects if a process is running _linux shell

Here is a brief description of a bash script that you wrote to detect if a process exists. directly on the code. Copy Code code as follows: #!/bin/bash ps_out= ' Ps-ef | grep $ | Grep-v ' grep ' | Grep-v $ ' result=$ (echo $ps _out |

Run and exec usage sharing for Wscript.Shell objects in VBScript _vbs

Set exers = objWS. Exec ("Pscp-r-scp-pw" & Password & "" & loginID & "@" & Host & ":" & Data_path & Filen Ame & "" & Windows_path)But inTestOfWhenWait, be handcuffed.BayesianThe file thanMoreBig, cuff.Longer shell timeOfWhenWait on theIsCmdWindow

Functions, function definitions, scope issues in the shell _linux shell

Speaking of function calls, I believe that we will not be unfamiliar, however, for beginners shell of me, the shell function call Way is a little let me not too accustomed to, I have gone a lot of detours, because the transfer parameters when a very

How many arguments does the shell support at most? _linux Shell

In the scripting process, the input of parameters is usually involved. For example, SH 1.sh 10 20, in the execution 1.sh this script, 10 is the first parameter, 20 is the second parameter. Sometimes, there is this confusion, that is, how many

The shell script implements monitoring swap space usage and viewing processes that occupy swap _linux shell

Copy Code code as follows: #!/bin/bash Echo-e ' Date +%y%m%d%h%m ' Echo-e "Pid\t\tswap\t\tproc_name" # Take out all directories in the/proc directory (the process name is the number is the process, others, such as sys,net, etc. store

Total Pages: 541 1 .... 412 413 414 415 416 .... 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.