18,773
社区成员
发帖
与我相关
我的任务
分享
#!/bin/sh
test $# -eq 1 || { echo "Usage:$0 number";exit 1; }
if echo $1 | egrep -q "^[0-9]+(\.[0-9]+|)$"
then
echo "$1 is a number";
printf "%'f\n" $1
else
echo "Usage:$0 number"
fi
#!/bin/sh
test $# -eq 1 || { echo "Usage:$0 number";exit 1; }
if echo $1 | egrep -q "^[0-9]+(\.[0-9]+|)$"
then
echo "$1 is a number";
else
echo "Usage:$0 number"
fi