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://hxwzsj.com/article/ghiceo.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 企业网站建设公司 成都模版网站建设 定制网站制作 成都网站建设 网站制作报价 企业网站设计 手机网站制作 四川成都网站制作 成都网站制作 商城网站建设 攀枝花网站设计 成都网站建设公司 成都网站设计 高端网站设计 手机网站制作 成都网站设计 网站建设 成都网站制作 重庆企业网站建设 成都网站设计 古蔺网站建设 成都网站建设