Linuxshell程序设计(学时).ppt

Linuxshell程序设计(学时)

$ cat exp2 echo –n “type in file name” read filename echo “type in data for this file” while read datax do echo $datax$filename done cat $filename 4.9.5 until语句 until语句的一般形式是: until 测试条件 do 命令表 done 它与while语句很相似,只是测试条件不同:当测试条件为假时,才进入循环体,直至测试条件为真时终止循环。 4.9.6 for语句 for语句是最常用的建立循环体的语句,使用方式主要有两种: 值表方式、算术表达式方式。 1.值

文档评论(0)

1亿VIP精品文档

相关文档