单选题:You are creating a script with demands that the previous command
You are creating a script with demands that the previous command execute correctly. How would you correctly test the exit status of the previous command in bash? @[B](1)
A. if [ "$#" -eq "0" ]; then...
B. if [ "$?" -eq "0" ]; then...
C. if [ '$#' == 0 ]; then...
D. if [ '$?' == '0']; then...
A.if [ "$#" -eq "0" ]; then...
B.if [ "$?" -eq "0" ]; then...
C.if [ '$#' == 0 ]; then...
D.if [ '$?' == '0']; then...
答案:B
A. if [ "$#" -eq "0" ]; then...
B. if [ "$?" -eq "0" ]; then...
C. if [ '$#' == 0 ]; then...
D. if [ '$?' == '0']; then...
A.if [ "$#" -eq "0" ]; then...
B.if [ "$?" -eq "0" ]; then...
C.if [ '$#' == 0 ]; then...
D.if [ '$?' == '0']; then...
答案:B