我的第一个shell程序
来源:互联网 发布:人工智能第一股跌至4元 编辑:程序博客网 时间:2024/05/16 09:43
ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
while [ $select -lt 3 ]
do
if [ $select -eq 1 ]; then
echo "Do: rm $filename ?"
read yesorno
if [ "$yesorno" = "y" ]; then
rm -f $filename
fi
else
if [ $select -eq 2 ]; then
cat $filename
else
exit
fi
fi
ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
done
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
while [ $select -lt 3 ]
do
if [ $select -eq 1 ]; then
echo "Do: rm $filename ?"
read yesorno
if [ "$yesorno" = "y" ]; then
rm -f $filename
fi
else
if [ $select -eq 2 ]; then
cat $filename
else
exit
fi
fi
ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
done
- 我的第一个shell程序
- 我的第一个shell程序
- Linux Shell 之 我的第一个Shell程序
- Linux Shell 之 我的第一个Shell程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 我的第一个程序
- 一个技术新闻的网站
- [招聘]工作机会
- 线性表的链式表示和实现(1)
- 「听的艺术」
- 母牛问题(原创)
- 我的第一个shell程序
- Eclipse经典插件
- DotNet Compact Framework中位图资源的使用学习笔记
- 一个简单的单例测试
- 提醒一个有关xml的
- 我来了,嘿嘿。。。。
- 走进苹果实验室
- Struts 的javax.servlet.servletexception: cannot find actionmappings or actionformbeans
- DJGPP下调用中断的方法