In an if statement, the ____ operator is used with a name as argument to check if it exists and is a directory.
查看答案
Which of the following are correct conditional options that can be used to test for file attributes? Select all answers that apply.
A. -e
B. -z
C. -d
D. -r
Which of the following statements can be used to compare two strings? Select all answers that apply.
A. if [ $STR1 == $STR2 ] ; then echo match found ; fi
B. if [ $STR1 -eq $STR2 ] ; then echo match found ; fi
C. if [[ $STR1 = $STR2 ]] ; then echo match found ; fi
D. All of the above
Which are possible correct commands to add two numbers? Select all answers that apply.
A. expr 2 + 3
B. echo expr 2 + 3
C. let x=( 1 + 2 ); echo $x
D. echo (expr(2 + 3))
What commands are used to write the output of the free command to /tmp/free.out? Select all answers that apply.
A. free >> /tmp/free.out
B. free
C. free > /tmp/free.out
D. free