nerdexam
LPI

101-500 · Question #302

101-500 Question #302: Real Exam Question with Answer & Explanation

The correct answer is C. foo && bar. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Shells and Shell Scripting

Question

You have two shell scripts, foo and bar. You wish to have bar execute if foo returns an exit status of 0 Select the correct command:

Options

  • Afoo; bar
  • Bfoo || bar
  • Cfoo && bar
  • Dfoo % bar

Explanation

You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Topics

#shell operators#exit status#command chaining#conditional execution

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice