If we want to debug the 15th line of a script, we must provide the _______ command on 14th line and the _______ command on 16th line of the script.
A. ./script 2> >, set +x
B. set -x, set +x
C. ./script 2>>, set +x
D. set +x, ./script 2>>
查看答案
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