1.

test and [ ] can be used for string comparison.(a) True(b) FalseI got this question in a national level competition.The query is from Using test and [ ] to Evaluate Expressions topic in chapter Essential Shell Programming of Unix

Answer»

Right option is (a) True

To elaborate: test can be used to compare strings with another set of OPERATORS (LIKE = for EQUALITY of strings and != for inequality). For example, [ ! -z$string ] negates [ -z$string ].



Discussion

No Comment Found

Related InterviewSolutions