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


    Question

    What does $# represent in a shell

    script?
    A Name of the script Correct Answer Incorrect Answer
    B Last argument value Correct Answer Incorrect Answer
    C Number of command-line arguments Correct Answer Incorrect Answer
    D Process ID Correct Answer Incorrect Answer
    E Total lines in file Correct Answer Incorrect Answer

    Solution

    $# expands to the count of positional parameters passed to the script, useful for validating input arguments.

    Practice Next
    ask-question