Question 5 — AZ-104 Practice Exam 6
Arrange the following Bash commands in the correct order to transform a text file into a paginated, printable format.
Instruction: Drag and drop the items into the correct order.
- pr
- lpr
- fmt
- cat file.txt
Correct answers
- cat file.txt
- fmt
- pr
- lpr
Explanations
Correct Order:
cat file.txt
fmt
pr
lpr
First, the file is displayed with cat. Then fmt formats the text into paragraphs. Next, pr paginates the text. Finally, lpr sends it to the printer. The sequence must be followed in this order for the transformation to work.