Bash Scripting - User Input
You want a script to print all arguments passed, one per line, using a loop. Which snippet correctly uses command-line arguments?
"$@" treats each argument separately; $* and "$*" combine all arguments into one string.for arg in "$@" loops over each argument correctly, preserving spaces.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions