一些shell程序问题,三个题。请高手指教
1以下程序完成的功能为:接受从键盘输入的总请求数量与回复数量,最终输出未回复数量。阅读并完成以下shell程序$echo"thetotalofask"$readtotal...
1以下程序完成的功能为:接受从键盘输入的总请求数量与回复数量,最终输出未回复数量。阅读并完成以下shell程序
$ echo"the total of ask"
$ read total
$ echo"the number of answer"
$ ____________________
$ echo"The number of no answer"
$ echo$ ((total-answer))
2以下程序完成判断一个数是否大于或等于50.阅读并完成以下shell程序
#!/bin/bash
echo"Enter a number"
read num1
____________
then echo "The number is greater than or equal to 50"
else echo "The number is less than 50"
fi
3以下程序用于实现响应用户输入的姓名,若未输入姓名则给予一个响应,否则给予另一个响应。阅读并完成以下shell程序
echo "please enter your name"
read name
__________
then
echo "you have not entered your name"
else
echo "you have a nice name:$name"
fi 展开
$ echo"the total of ask"
$ read total
$ echo"the number of answer"
$ ____________________
$ echo"The number of no answer"
$ echo$ ((total-answer))
2以下程序完成判断一个数是否大于或等于50.阅读并完成以下shell程序
#!/bin/bash
echo"Enter a number"
read num1
____________
then echo "The number is greater than or equal to 50"
else echo "The number is less than 50"
fi
3以下程序用于实现响应用户输入的姓名,若未输入姓名则给予一个响应,否则给予另一个响应。阅读并完成以下shell程序
echo "please enter your name"
read name
__________
then
echo "you have not entered your name"
else
echo "you have a nice name:$name"
fi 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询