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


    âš¡ Month End Offer - Flat 52% Off On All Courses! Enroll Now âš¡
    00:00:00 AM Left

    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