Shell implementation to determine if a process exists and restart script sharing _linux Shell

Concise version: #! /bin/bash # author Caoxin # time 2012-10-10 # Program: To determine whether to exist and restart function check () { count= ' PS -ef |grep |grep-v "grep" |wc-l #echo $count if [0 = $count];then nohup

Shell script Implementation bulk download network picture code sharing _linux Shell

Recently, in order to do a weather forecast project, need to download some weather icons from Yahoo, but because of more than 80 icons. The icons are stored on the Yahoo image site. Thunder does not support HTTPS downloads, although it can be

Shell Script Programming Circular Statement Learning notes _linux Shell

This blog is simple to look at the loop statements that Shell programming uses, including for loops, while loops, until loops, for behind and a variable, and then a collection that assigns things to this variable, each loop, like a foreach in Java.

Monitor whether the site can be opened normally by Shell script sharing _linux Shell

Recently, just need to test the stability of the new station, so write a shell script to the local (recently changed MAC), to real-time view you need to monitor the status of the Web page, and sent to the designated mailbox. Here's a compliment. OS

Ali so server Linux system update Yum source shell script _linux Shell

All executed scripts need root identity to execute: Execute the command as root: Bash xxx.sh Function: Automatic detection system and update sourceApplicable system version: compatible with all Linux versions on lineHow to: Execute a command as

One-button backup Gitolite server shell script _linux shell

Once run, the warehouse on the Gitolite server can be backed up to the local. The first run creates a local mirror of the remote warehouse, which updates the local mirror each time it runs. This program only supports SSH mode Other GIT servers do

Scripting code for sensitive users in Linux systems _linux Shell

A sensitive user here means that the user belongs to more than one group, or that the user belongs to a group name that is not the same as the user name. #! /bin/bash #list user who belong than one group #and list user who belong to the

A method in the shell script to convert the input password to * (asterisk) _linux shell

If you need to write a section to interact with the user, and need to input some sensitive information (for example: User password, license, etc.), the direct use of printf+read, the user input information will be displayed on the screen, which is

Example of splitting strings in a shell _linux shell

For example, to split test= "AAA,BBB,CC cc,dd dd", you can Copy Code code as follows: arr=$ (Echo $test |tr "," \ n ") I can do that. Copy Code code as follows: old_ifs= $IFS Ifs= ', ' Arr= $test ifs= $OLD

Automatically kills shell scripts that consume more CPU resources _linux shell

Copy Code code as follows: #!/bin/bash # march-13-2006# Cpuuse Trigger script by Noel## Bash code to watch a running program ' s CPU usage.# if it ' s above a set value, it'll auto send an email.# You'll need to set a Cron job to run this

Shell to process filename instances with spaces _linux shell

There was a problem working with files today, and the for loop is problematic when the file name contains spaces. For example, I create 3 files in the current folder that contain spaces: Copy Code code as follows:

The shell script that statistics appche site IP traffic under Linux _linux

Often need to statistics Apache site traffic based on the IP address, the most basic script. In descending order based on IP traffic: Copy Code code as follows: #!/bin/bash #Script_name: Access_count

JS uses the Wscript.Shell object to execute. bat files and cmd commands _javascript tips

Wscript.Shell (Windows Script Host Runtime Library) is an object, and the corresponding file is c:/windows/system32/ Wshom.ocx,wscript.shell is a component that the server system will use. Shell is the meaning of "shell", this object can perform

The iptables of the shell

ack

These five positions are also known as five hooks (hook functions), also called Five rule chains.1.PREROUTING (before routing)2.INPUT (packet inflow port)3.FORWARD (forward tube card)4.OUTPUT (Packet egress)5.POSTROUTING (after routing)This is the

Shell Foundation Learning Series One: first shell script

Open a text editor, create a new file with the extension sh (sh for Shell), and the extension does not affect script execution.Enter some code: #!/bin/bash echo "Hello world!" "#!" is a contract tag that tells the system what

Shell file-related directives

File Decompression tarPlease refer to the documentation: HTTP://BLOG.CSDN.NET/EROSWANG/ARTICLE/DETAILS/5555415/tar -zcvf ${standardpath}${filename}. tar. GZ ${filename}File Delete rmRM -r/dirrmfilerm -rf/dir-R,-R,--recursive remove

Shell Programming Basics-sed Command

The SED usage of LinuxSed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the following first understand the use of

environment variable configuration file for Shell programming

1. Introduction to environment variable configuration file  1.1 Source command:Source configuration file or . configuration fileAfter you modify the configuration file, you must log off and re-login to take effect, using the source command without

Use shell scripts on Linux to view memory conditions (super-practical)

#!/bin/bashExport Chknum=1#shell搅拌存放目录 (The output log file is also stored in the directory after it is executed)Echo 3 >/wls/wls81/shellSyncWhile [$chknum-ge 0]Doecho "-------------------------------------------------------" >> Trace.logmt= ' Free |

Use Linux shell to delete folders on window recursively

ObjectiveIn the Windows environment, organize the code, the code contains the. svn folder, which exists in all controlled directories and needs to be removed uniformly.But not familiar with Windows shell, want to use Linux rm to delete, how to

Total Pages: 541 1 .... 405 406 407 408 409 .... 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.