The dashboard gathers a few facts about the phone and lays them out under clear headings. This set covers printing figures with printf, guarding a read that may not exist, and choosing a section that always works offline.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Print the disk and local lines
This prints the disk section and the local section the way the dashboard builds them, so you can see the figures filled into their sentences. The disk line is trimmed from df, and the local lines come from date.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
tail -n +2 drops the header row of df, so only the data line is left for awk to read.
the disk line gives used, total and a percentage
the time zone line names the current zone
the local line gives the current time
the commands actually ran
What a good answer looks like
A Disk heading, then a line built from the df columns that reads as a used figure, the words used of, the total, and a percentage in brackets. Then a Local heading, then a timezone line naming the current zone and a now line with the time in hours and minutes. The figures differ on every phone, which is the point: the sentence is assembled from whatever df reports. If the disk line is missing, tail or awk lost the data row.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.