Select the command that appends the error output to a temporary log file.
A. $ ./script 2>> /tmp/scriptlogfile
B. $ ./script 2> /tmp/scriptlogfile
C. $ ./script 2
D. $ ./script 2/>> /tmp/scriptlogfile
查看答案
Which of the following is not a valid looping construct?
A. while
B. until
C. after
D. for
Which of the following looping constructs produces an output different than the others?
A. j=7 ; while [ $j -lt 10 ] ; do echo $j ; j=$(($j+1)) ; done
B. j=7 ; until [ $j -eq 10 ] ; do echo $j ; j=$(($j+1)) ; done
C. for j in 7 8 9 ; do echo $j ; done
D. j=7 ; for ( j
Which of the following statements are true about the case statement? Select all answers that apply.
A. It enables you to match several values against one variable
B. It ensures that the condition is true for all cases
C. It is a good alternative to nested multilevel if-then-else-fi statements
D. It indicates that any one of the conditions needs to be true, to perform the specified action
Select the correct syntax to find the length of the string abc.
A. $#[abc]
B. ${abc#}
C. $#{abc}
D. ${#abc}