a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 396|回复: 0

[红帽认证] RHCE辅导:RH033题库Topic#11Shell脚本

[复制链接]
发表于 2012-8-4 12:19:50 | 显示全部楼层 |阅读模式
Topic #11 Shell 脚本 :: R( F) A  R. ]8 d, m% P5 J- ~' Y

5 B4 h8 h6 p1 Q8 |31) 以下shell 脚本中,date命令将执行多少次?
/ T6 X' ?! q/ h/ nfor i in a b; do date; done
1 e) Y, D: W; I      0
* |6 ~% Q6 `" k# P2 K7 n( F/ a: {2 j/ t      18 G* Y4 r9 O( s3 |& Z! V; `
      2' S2 {# ?6 O4 B* p  J
9 t, P8 K0 S& ?# E1 l. E
32) 以下shell 脚本中什么条件才会回显 hello?
9 ^1 n- ]( j! T% |$ l" x* cif [ -d newitem ]; then echo hello; fi
) A8 C' v6 T+ I. {! ]      如果 newitem 是一个目录。, Y5 g1 |* _$ h" ~( P6 H- ?3 C
      总是回显。
6 L; W+ ]% G3 l( \# ~1 ~0 I2 J$ m      从不,因为 netitem是非空字串。9 y! `. t' u- ?" x
5 b0 C' W+ n0 {' N
33) 当在shell脚本中使用while/do循环时,continue语句的作用是什么?7 T1 O% T$ m1 p- Y
      暂停一秒,然后继续执行。
, r( @  z2 G0 s& G3 b      打断do循环, 跳至while语句重新判断条件语句。: A' a7 R* e) K; m, H: z4 m
      跳至done语句后继续执行。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-6-26 23:46 , Processed in 0.273189 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表