Compare Two .env Files Without Leaking Secrets
Staging and production configs drift apart, and someone has to find out which keys differ. The files contain secrets, so the report must never show a value.
Create the executable script /home/student/bin/envdiff.sh OLD NEW for files of KEY=value lines:
# (after optional spaces),=,+ KEY if the key is only in NEW,- KEY if the key is only in OLD,~ KEY if it's in both with different values,0 if there are no differences, otherwise 1,/home/student/env/staging.env and /home/student/env/prod.env are there to try it on.
About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Part of Shell Scripting for Automation. Next step: Summarize Test Results for the Pipeline
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.