nerdexam
LPI

101-500 · Question #302

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:

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

How the community answered

(47 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    87% (41)
  • D
    6% (3)

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