if [ $# ne 1 ]
then
echo "i need a string to convert"
else
if $1~[a-zA-Z]
then
fi
fi
就是输入的变量应该包含有a-z,A-Z,但是不知道怎么写
http://bbs.chinaunix.net/thread-674903-1-1.html
str=$1
if [ $# -ne 1 ];then
echo "i need a string to convert"
else
if echo $str |grep -qs "[a-zA-Z]";then
echo "ok"
fi
fi
会员注册
会员登录
个人空间