フリー問題

CompTIA AutoOps+ のフリー問題 1 / 20 問目

問題文

A shell script runs the same three health checks for every host, and the blocks differ only in the host name. Which change keeps the logic in one place?

選択肢

  1. Move the repeated checks into a copied code block and take the host name from the script filename on each call.
  2. Move the repeated checks into a single callable function and take the host name from the inventory listing on each call.
  3. Move the repeated checks into a single callable function and take the host name from the script filename on each call.
  4. Move the repeated checks into a copied code block and take the host name from the inventory listing on each call.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。