下列脚本的运行结果是():#!/bin/bashresult=0for i in 1 2 3 4doresult=result+idoneecho $result
A. 10
B. 4
C. result+i
D. 报错
查看答案
下列脚本的运行结果是():#!/bin/bashfor i in "1 2 3"doresult=$idoneecho $result
A. 1
B. 2
C. 3
D. 1 2 3
在bash中,支持下列哪些循环()。
A. for
B. while
C. until
D. loop
在shell中,只支持for循环和while循环。
A. 对
B. 错
在bash中,continue表示退出当前循环,开始下一次循环。
A. 对
B. 错