Multiple choice technology operating systems

What is the difference between for i in "$@" and for i in "$*" ?

  1. "$@" takes the entire list and seperates it into special arguments whereas "$*" takes the entire list as one argument with spaces between them
  2. "$*" takes the entire list and seperates it into special arguments whereas "$@" takes the entire list as one argument with spaces between them
  3. Both statements will behave in the same way

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When enclosed in double quotes, "$@" expands to separate positional parameters as distinct quoted arguments ("$1" "$2" etc.), preserving spaces. Conversely, "$*" expands to a single concatenated string containing all arguments separated by the first character of IFS.