The Missing Command
A monitoring script keeps failing with jq: not found and bc: not found. Your job: find out which of the tools it needs are installed, install what's missing, and clean up a package that shouldn't be there. Password: student.
How it works: the terminal below is a real Linux machine running in your browser. Click it and
type. Tasks tick themselves off as you complete them; questions are answered in the box under each task.
Press Reset any time for a fresh machine. Your password on this machine (for
sudo) is student.
Hints
A loop makes the check easy: for p in htop jq bc; do apk info -e $p; done.
You can install several packages in one apk add.
Solution explanation
apk info -e NAME prints the name only if the package is installed, so checking the three tools shows only htop was there. sudo apk add jq bc installs the two missing ones in a single command, and sudo apk del figlet removes the one that didn't belong. apk info > installed.txt records the final set of packages.
Show solution
for p in htop jq bc; do apk info -e $p; done
sudo apk add jq bc
for p in htop jq bc; do apk info -e $p; done
sudo apk del figlet
apk info > installed.txt
grep -E 'htop|jq|bc|figlet' installed.txt