文章详情
时间:2010-11-29 来源:kevin33643
#/bin/sh validAlphaNum() { compressed="$(echo $1 | sed -e 's/[^[:alnum:]]//g')" if [ $compressed == $1 ] then return 0 else return 1 fi } echo -n "Enter input:" read input if ! validAlphaNum "$input" then echo "Your input must consist only alpha and number" >&2 exit 1 else echo "Input is valid" fi exit 0
辰域智控app
网医联盟app
汇丰汇选App
1970-01-01