Discussion
In Unix, how do you check that two given strings a and b are equal ?
Answer: C
In Unix, two strings are compared for equality with test $a = $b, which is option C. The test command uses = for string comparison, while -eq is the operator for comparing integers.
The operator -equal does not exist, and "Sh -C test $a == $b" is not the usual form, since == is not accepted by the standard test command and the shell option is -c, not -C. Hence only option C is correct.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development