The ___ option in case statement matches any option not matched by the previous options.

The ___ option in case statement matches any option not matched by the previous options.
A. ^
B. $
C. *
D. //
 
Answer: c
Explanation: The last option (*) or the default option is used for matching any option which is not matched by any of the previously specified options. For example,
Code:
case “$choice” in
   1)  ls  -l ;;
   2)  ps -f ;;
   3) who
   *) echo “invalid option” 
esac
 

Tìm kiếm

Back
Top