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
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.
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
#!/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 |
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
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