Question 310
The script below is run as `./task.sh 61 92 10` 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=92, $3=10, $1=61.
Incorrect Answers
The printed text would not be 61-92-10; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 92-10-61.
The printed text would not be 92-61-10; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 92-10-61.
The printed text would not be 10-92-61; the script uses exactly the stated parameter positions and Bash expansion, so the computed result is 92-10-61.






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