shell脚本例子 #!/bin/shstr="####"echo $1 | grep $str 1>/dev/nullif [ `echo $?` -eq 0 ]then echo ${1//$str/""}else echo $2 not PResent in $1fi