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
文章源于:https://www.cdcxhl.com/article40/ghiceo.html

成都网站建设公司_创新互联,为您提供网站设计公司网站维护电子商务软件开发定制开发微信小程序

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都网站建设公司