bash return codes

bash return codes

Assessment

Flashcard

Computers

9th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

5 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What will the return code likely be? Options: 0, >0, Depends on the contents of the file

Back

0

2.

FLASHCARD QUESTION

Front

What is the exit code likely to be?

Back

0

Answer explanation

Return code refers to the last command executed, which is in this case the echo, not ls.

3.

FLASHCARD QUESTION

Front

I think of pipes & redirects as arguments. According to this, which are treated as arguments?

Back

neither

4.

FLASHCARD QUESTION

Front

What will the exit code likely be?

Back

0

Answer explanation

Again, exit code is generated by the very last command executed. What is it this time?

5.

FLASHCARD QUESTION

Front

What is the return code?

Back

>0

Answer explanation

Again, exit code is generated by the very last command executed. What is it this time?