📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    In shell scripting, which operator is used for string

    comparison?
    A -eq Correct Answer Incorrect Answer
    B -gt Correct Answer Incorrect Answer
    C == Correct Answer Incorrect Answer
    D -lt Correct Answer Incorrect Answer
    E && Correct Answer Incorrect Answer

    Solution

    For strings, == checks equality. Numeric comparisons use -eq, -gt, etc.

    Practice Next
    ask-question