LPI
101-400 · 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. 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
(62 responses)- A3% (2)
- B8% (5)
- C74% (46)
- D15% (9)
Community Discussion
No community discussion yet for this question.