Copy Code code as follows:
#!/bin/bash
ping= ' which ping '
Date= ' Date +%y%m%d%h%m '
Tail= ' which TAIL '
Log=./ping$date.log
hosts= "selboo.com.cn 221.130.191.97"
count=200
For MyHost in $HOSTS
Todo
count=$ (ping-c
For example, you might want to refer to the following implementation for a script that requires only sequential access to a resource, such as a disk file.
Copy Code code as follows:
#!/bin/bash
#
# File locking using Bash.
# ver 0.1.6
Shell string Comparisons, judging whether it's a number
Binary comparison operator, comparing variables or comparing numbers. Note the difference between numbers and strings.
Integer Comparisons
-eq equals, such as: if ["$a"-eq "$b"]
-ne is
In Linux, the/proc/$PID/status file provides the usage of the process resources (memory, stack, semaphore, child parent process), although Linux provides a lot of commands to view memory, but it's all about the overall usage and cannot view the
Copy the files under the Bill folder to a certain rule (file name parity) under the Bill1,bill2 folder.Update BILL1,BILL2 Processing Progress tab (update File.max)File3 is the label for the current latest file in the bill directory and will normally
command function : Cutting files, cutting files in units of behavior or in bytes
command Syntax :
Split [–help][–version]
Split [-][-l , in number of rows
Split [-B ][-c
The output file name refers to the cut file as a prefix.
1. Cutting
The following describes how to force users to change their passwords the next time they log on.
Each user account under Linux is associated with the various configuration and information associated with the password. For example, it remembers the
Summary
SEO optimization of the first step is to let spider spiders often come to your site to patronize, the following Linux commands can let you know the spider crawling situation clearly. Below we analyze for Nginx server, log file
Function Fly Shovel is simpler, just get the extranet IP. Some sites are processed for Curl UA.
Meet their own collection of addiction, collected a lot can be used to query the Internet IP URLs and methods.
#国内某网站的接口, only return IP
Curl ip.665
Here today we discuss a very funny system configuration error in Linux systems, which is sudo, and why it's funny, because if it's improperly configured, it's easy for the average user to claim root, and without a bit of technical content, System
Copy Code code as follows:
#!/bin/sh
# Get the first day of the quarter, the date interval to yesterday
# link:www.jb51.net
# DATE:2013/2/28
Day= ' date-d "1 days Ago" "+%y%m%d";year= ' expr substr ${day} 1 4 ';Month= ' Expr
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 "'
A shell script that backs up a database
Copy Code code as follows:
#!/bin/bash
#指定运行的脚本shell
#运行脚本要给用户执行权限
Bakdir=/backup
Month= ' Date +%m '
day= ' Date +%d '
Year= ' Date +%y '
Hour= ' Date +%k '
min= ' Date +%m '
$#: Number of parameters passed to script$*: Displays all parameters passed to the script in a single string. Unlike positional variables, this option argument can exceed 9$$: The current process ID number of the script run$! : The process ID number
Embedded beginners, the first time to upload code. Yesterday did a UDHCPD and Udhcpc Guardian, currently only with Shell imitation writing, what method can do guardian?
#! /bin/sh
#进程名字可修改
pro_name=udhcpc
wlan=ra0 while
true;
# get
Linux shell script detects tomcat and restarts automatically
Background Run command sh xxx.sh &View background tasks: JobsSummoned to the front desk: FG Jobs number
The code that can delete the while loop is put into the crontab, and the script
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