shell习题170920-给文档增加内容
新朋友请点上方
蓝字“阿铭linux”关注
在文本文档1.txt第5行后面增加如下内容:
# This is a test file.
# Test insert line into this file.
答案明日公布。
习题170919-打印数字==参考答案==
#!/bin/bash
read -p "请输入您想要暂停的数字:" number_1
for i in `seq 1 $number_1`;
do
echo $i
done
read -p "是否继续输入数字?" a
if [ $a == "yes" ];then
read -p "请继续输入您想要暂停的数字:" number_2
number_3=$[$number_1+1]
if [ $number_2 -gt $number_1 ];then
for h in `seq $number_3 $number_2`;
do
echo $h
done
else
echo "输入数字错误,请输入大于的数字!"
fi
else
exit
fi
- END -
出品 | 阿铭linux

私人微信:81677956 验证:公众号
提升自己,才是世界上最稳健的投资。
- 每日一题 | 一级建造师考试-第26天
- 真题是最好的练习题—平哥逐题讲解14-17年新课标高考真题,马上
- 周六来一波公基练习题?
- 2018全国护士资格考试练习题
- 【西邮Linux技术分享】Linux Shell
- 初学者习题:死活精解
- 11月24日护理知识习题,模拟考场 挑战开始!
- 11月23日临床知识习题,模拟考场 挑战开始!
- linux shell命名管道FIFO
- 国考练习题:逻辑判断
