MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
WHICH_ONE_OF_THE_FOLLOWING_OPTION_IS_USED_FOR_OR_OPERATION_IN_TEST_COMMAND??$ |
| A. | -o |
| B. | -a |
| C. | -e |
| D. | -an |
| Answer» B. -a | |
| 2. |
Which_one_of_the_following_option_is_used_for_checking_that_the_string_is_not_null?$ |
| A. | -a |
| B. | -o |
| C. | -z |
| D. | -n |
| Answer» E. | |
| 3. |
Which one of the following option is used for AND operation in test command? |
| A. | -o |
| B. | -a |
| C. | -e |
| D. | -an |
| Answer» C. -e | |
| 4. |
test and [ ] can be used for string comparison. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 5. |
It is essential to use whitespaces when we use []. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 6. |
Which of the following operator is used as a shorthand for test? |
| A. | % %              |
| B. | [ ]              |
| C. | & & |
| D. | ( ) |
| Answer» C. & & | |
| 7. |
___ implies greater than and ____ implies less than. |
| A. | gt, le |
| B. | gt, lt |
| C. | ge,le |
| D. | ge,lt |
| Answer» C. ge,le | |
| 8. |
We can use comparison operators without a ‘-‘.$ |
| A. | True |
| B. | False |
| Answer» C. | |
| 9. |
Which of the following operators is used with test for comparison of numeric values? |
| A. | -eq |
| B. | -ne |
| C. | -gg |
| D. | –eq and -ne |
| Answer» E. | |
| 10. |
test command can be used to check which of the following? |
| A. | Compare two numbers |
| B. | Compare two strings |
| C. | Check attributes of a file |
| D. | All of the mentioned |
| Answer» E. | |