Shells and shell scripting — page 3
Objective 105 of LPIC-1 Exam 102-500, worth 15% of the exam. This is page 3 of 3 of its question list; page one carries the full objective summary.
- Share of the exam
- 15%
- Questions in a real sitting
- roughly 9 of 60
- Questions in this bank
- 45
- Signed for by a person
- 0
- Machine-checked only
- 45
Partly checked. None of the 45 questions here has been read against the cited source by a person. 45 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
What this objective covers
The 45 questions written for this objective cite 2 LPI exam objectives (105.1, 105.2) and 4 manual pages (bash(1), execve(2), test(1), useradd(8)).
They break down as 30 single-answer questions, 7 choose-several questions and 8 type-the-answer questions.
Drill this objective
The trainer can run a short practice set drawn from this objective alone, which is what the weight column above is for: revise the heavy objectives first.
Practise Shells and shell scripting
Questions on this objective (page 3 of 3)
- A startup file exported http_proxy, and for the rest of this session the variable must be gone completely: neither set nor env should list it any more, and a program started from this shell must not find it even as an empty value. Which command does that? machine-checked
- Type the name of the shell variable, without a leading dollar sign, whose value bash expands and displays as the primary prompt string before each interactive command. machine-checked
- A script takes an optional directory as its first argument and must fall back to /var/log when it is called with no arguments at all. The positional parameters themselves must not be changed. Which line does that? machine-checked
- A script must store the output of the command date +%F in the shell variable TODAY. Which TWO lines do that? (Choose two.) machine-checked
- A backup script runs the pipeline tar cf - /srv | gzip > /backup/srv.tar.gz and then examines $? on the next line. tar exits non-zero because one file could not be read, while gzip compresses what it was given and exits 0. Assuming default shell options, what does $? hold? machine-checked
Practise Shells and shell scripting
The other objectives in LPIC-1 Exam 102-500
- 106. User interfaces and desktops — 6.67% of the exam
- 107. Administrative tasks — 20% of the exam
- 108. Essential system services — 18.33% of the exam
- 109. Networking fundamentals — 23.33% of the exam
- 110. Security — 16.67% of the exam