#!/bin/bash # First, we'll define some paths to programs that we'll need. This is good # practice for security and it also arguably keeps the script clean LS="/usr/bin/ls --color=auto" # Next, we'll simplify the mini-quizzes by wrapping them in a function. The # idea behind this is to provide a safe environment for the learner to run # commands in, while still feeling like a bash shell. function test_command { while true; do read -p "$TUTOR_PROMPT" command case $command in "$1") $2; break;; *) echo "Hmm, that didn't quite look right. Try typing '$1' and pressing Enter" esac done } cat <