RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
linuxoperators

#! /bin/bash
print_usage(){
printf "please enter an integer\n"
exit 5
}

成都创新互联公司长期为近千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为内蒙古企业提供专业的成都网站设计、网站建设,内蒙古网站改版等技术服务。拥有10年丰富建站经验和众多成功案例,为您定制开发。

read -p "please input first number: " firstnum
if [ -n "echo $firstnum | sed 's/[0-9]//g'" ];then
print_usage
fi

read -p "please input operators: " operators
if [ "${operators}" != "+" ] && [ "${operators}" != "-" ] && [ "${operators}" != "" ] && [ "${operators}" != "/" ];then
echo "please input {+|-|
|/}"
exit 10
fi

read -p "please input send number: " secondnum
if [ -n "echo $secondnum | sed 's/[0-9]//g'" ];then
print_usage
fi
echo "${firstnum}${operators}${secondnum}=$((${firstnum}${operators}${secondnum}))"


名称栏目:linuxoperators
标题网址:http://sczitong.cn/article/ghiceo.html