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