
How to use the true and false commands: 2-Minute Linux Tips
Interactive Video
•
Architecture, Information Technology (IT)
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What exit code does the true command generate?
2
1
0
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the exit code generated by the false command?
3
2
1
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a common use of the 'while true' command?
To sort a list
To run a loop indefinitely
To terminate a process
To generate random numbers
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you ensure a failing command returns an exit code of 0?
By using the false command
By piping its output to the true command
By restarting the command
By using a try-catch block
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens to the exit code when a non-existent file is piped to the true command?
It becomes 2
It remains 1
It changes to 0
It is undefined
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?