nerdexam
LPI

117-101 · Question #10

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. See the full explanation below for the reasoning.

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

(23 responses)
  • A
    4% (1)
  • B
    13% (3)
  • C
    78% (18)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 117-101 Practice