📢 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

    Which symbol is used in shell scripting to reference a

    positional parameter, e.g., the first argument passed to a script?
    A $0 Correct Answer Incorrect Answer
    B $1 Correct Answer Incorrect Answer
    C $# Correct Answer Incorrect Answer
    D $? Correct Answer Incorrect Answer
    E $$ Correct Answer Incorrect Answer

    Solution

    $1 refers to the first argument passed to a shell script; $0 is the script name, $# is the number of arguments.

    Practice Next
    ask-question