Multiple choice technology operating systems

Which of these is a number comparison operator in shell scripts?

  1. -eq

  2. -ne

  3. -lt

  4. All of the above

  5. None of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In shell scripting, -eq (equal), -ne (not equal), and -lt (less than) are all integer comparison operators used within [ ] or (( )) constructs. They compare numeric values, not strings. Other common operators include -gt, -ge, and -le.