全局替换由crontab起的shell脚本中的某些字符串
遇到这样一个需求: 需要替换crontab起的shell脚本中的某个域名,但是不知道crontab中到底有多少的shell脚本包含被替换的域名,难道要手工去查找么?于是写了个脚本,并通用之 功能:替换crontab中的shell脚本的某个字符串为另外一个,用法: Usage : sh replaceCronScript.sh src="string1" dst="string2" Example: sh replaceCronScript.sh src=clicklog.dtc.log.sz.com dst=soso1_0.dtc.log.sz.com #! /bin/bash ##################################################### #name : replaceCronScript.sh #note : replace some crontab shell scripts's # : string with new string #date : 2012.12.27 #author : <peterguo@vip.qq.com> #################################################### if [ $# -eq 0 ]; then echo "Usage : sh $