根据注释补充正确代码()?#!/bin/bashgNUM=8echo "请输入1到10之间的数"while read GUESSdoif () ;then # 补全代码,判断输入的值是否等于变量gNUM的值echo "你猜中了"breakelseecho "错误,重试"fiDone(1.0)
A. ( $GUESS -ne $gNUM )
B. [ $GUESS -ne $gNUM ]
C. [ $GUESS -eq $gNUM ]
D. ( $GUESS -eq $gNUM )
查看答案
变量赋值不正确的是()?(1.0)
A. $v1=123
B. v1=123
C. v1=$v2
D. v1="$v2"
下列执行脚本文件test1.sh方法错误的是()? (1.0)
A. . ./spa1.sh p1 p2 p3
B. bash ./spa1.sh p1 p2 p
C. source ./spa1.sh p1 p2 p3
D. exec ./spa1.sh p1 p2 p3
能实现输出字符串$Dollar$的命令是()?(1.0)
A. echo \$Dollar\$
B. echo $Dollar$
C. echo \$Dollar$
D. echo $Dollar\$
当svar=199,执行命令echo "$svar this is `ls`",显示结果是()?(1.0)
A. $svar this is ls
B. $svar this is 当前目录的列表内容
C. 199 this is 当前目录的列表内容
D. 199 this is `ls`