QuestionQ58

VerifiedAutomation, Orchestration, and Scripting

A systems administrator is creating a script that copies a file when it exists and returns an error when it does not. Given this incomplete script:

Question Image

Which of the following statements is absent from the script?

Explanation

In Bash, else introduces the branch that runs when the if file-existence test evaluates to false. It separates the successful copy operation from the echo "File not found" error path before fi ends the conditional.

Community Discussion

No comments yet. Be the first to start the discussion!