back to labs
Shell Variables
EasyShell Scripting10-20 minThe brief
Variables hold values you reuse. Assign with name=value (NO spaces around =) and read back with $name.
Write /root/scripts/greet.sh that sets two variables and prints one sentence built from them. It must output EXACTLY:
Ada likes green
Use a variable for the name (Ada) and one for the colour (green), then echo a line that references both — e.g. name=Ada; colour=green; echo "$name likes $colour". Grading runs your script and checks the exact output.
What you'll do
- Assign two variables (name and colour) with no spaces around =
- echo a sentence referencing both so the script prints exactly 'Ada likes green'
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
