問題文
An administrator uses a code-generation assistant to draft a shell script that manages user accounts on production servers. Which practice should be applied before the script is used?
選択肢
- Accept the script as-is if it runs without errors, because a script that exits with a zero status has necessarily performed the operations it was asked to perform and therefore requires no further review.
- Replace all variable names with literal values so the script is easier to audit, since a script without variables cannot behave unexpectedly on any host.
- Run the script directly on one production server first, since a single host limits the impact and confirms the behavior in the real environment before the script is rolled out to the remainder of the fleet.
- Review the generated commands and options against the documentation and test the script in a non-production environment, because generated text can reference options that do not exist or behave differently.