- 7
- 0
- 约1.41万字
- 约 55页
- 2018-12-02 发布于浙江
- 举报
《unix-os教课件》第五章 shell程序设计
if-then-fi 的运行结果 [root@stu1 no11]# ./6_shell.sh 6.1_shell.sh File 6.1_shell.sh exists [root@stu1 no11]# ./6_shell.sh no11 File no11 is a directory if-then-else-fi 语句 语法结构为: if [ 表达式 ] then 命令表1 else 命令表2 fi 如果表达式为真, 则执行命令表1中的命令, 退出if 语句; 否则执行命令表2中的语句, 退出if语句。 if-then-else-fi 例子 例子:shell程序6.1_shell.sh,测试输入的字符串是否是已存在的文件或目录名. #! /bin/bash echo input a filename: read filename if [ -d $filename ] then
您可能关注的文档
- 《ps电课件》第09章.pptx
- 《rhino教学件》第04章.pptx
- 《rhino学课件》第08章.pptx
- 《rhino教学件》第09章.pptx
- 《rfid原理及应用》1章 rfid概论.ppt
- 《rhino教学课》第02章.pptx
- 《rhino教学课》第12章.pptx
- 《rhino教学课件第03章.pptx
- 《ps电子课》第13章.pptx
- 《rhino教学课件第11章.pptx
- 《unix-o教学课件》第三章 unix的文本编辑工具.ppt
- 《the geography of transportsystems》教学课件tgchapter6_applications.pptx
- 《unix-s教学课件》第一章 绪论.ppt
- 《unix-s教学课件》第六章 unix系统编程基础 -automake.pptx
- 《unixos教学课件》unix操作系统实验一.ppt
- 《unix操作系统教学课件》第6章 户与用户组管理.pptx
- 《unix操作系统教学课件》第7章 nix文件、目录和档案的操作.pptx
- 《the geogrphy of transport-systems》教学课件tgchapter2_concepts.pptx
- 《vitek2 高级专系统及替加环素的检测》.ppt
- 《win8培训课件》fy12寒促520产品培训.pptx
原创力文档

文档评论(0)