Multiple choice technology operating systems

How can you determine the number of positional parameter passed to the script ?

  1. $# will print the same
  2. $? will print the same
  3. $! will print the same
  4. $$ will print the same
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In shell scripting, $# expands to the number of positional parameters passed to the script. Meanwhile, $? holds the exit status of the last executed command, $! contains the process ID of the most recent background command, and $$ represents the current shell's process ID.