You're reviewing a shell script and notice that it uses a loop to process command-line arguments. Which special variable in shell scripting is typically used to handle this scenario?

  • $@
  • $*
  • $1
  • $ARG
In shell scripting, the special variable $@ is typically used to handle command-line arguments. It represents all the arguments passed to the script as an array. Using $@ allows you to iterate through and process each argument in a loop.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *