
实验七:Shell编程
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
本实验旨在通过一系列实践任务,引导学生掌握基本的Shell编程技巧和常用命令,提升其脚本编写能力与系统管理效率。
1. 编写一个shell脚本程序来打印出班级总成绩排名前3名(按总成绩递增)学生的姓名、学号以及总成绩。输出格式如下:(姓名,学号,第1至第3门课程的成绩及总成绩):
- 张三 23 40 70 60 170
- 王五 31 60 60 80 200
- 李四 2 100 50 90 240
学生成绩文件需要自行创建。
2. 编写一个shell脚本程序,用于显示当前目录中的所有子目录名称。
3. 创建一个包含菜单功能的shell脚本。执行后会看到如下界面:
```
Number Name For Linux Menu
1 exit leave menu or return
2 menu goto another local menu
3 vi deit a file
4 mail read a mail
5 send send mail to someone
6 cal see your calendar
7 who see who is on the system
8 ls list the files in this directory
9 cat display a file on the screen
Please enter a number or a name for the action you wish:
```
该脚本应具备清屏功能,并能正确执行各项命令及显示。
全部评论 (0)
还没有任何评论哟~


