shell脚本例子

#!/bin/sh
 
str="####"
echo $1 | grep $str 1>/dev/null
if [ `echo $?` -eq 0 ]
then
  echo ${1//$str/""}
else
  echo $2 not present in $1
fi

posted on 2014-04-10 00:37  sangbiao  阅读(221)  评论(0编辑  收藏  举报