test command can be used to check which of the following?

Quang Hiếu

New member
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: d
Explanation: When we use if to evaluate expressions, we need the test statement because the true or false values returned by expressions can’t be directly handled by if. The test uses certain operators to evaluate the condition on its right and returns either true or false exit status. test works in three ways:
• compares two numbers
• compare two strings or a single one for a null value
• check a file’s attributes
 

Tìm kiếm

Back
Top