Question 300
The script below is run as `./task.sh 41 62 9` on a RHEL 10 host: #!/bin/bash printf "%s" "${2}-${3}-${1}" What exact text is printed to standard output?
Explanation
Correct Answer
The braces select arguments in the explicit order $2=62, $3=9, $1=41.
Incorrect Answers
The printed text would not be 41-62-9; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 62-9-41.
The printed text would not be 62-41-9; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 62-9-41.
The printed text would not be 9-62-41; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 62-9-41.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests