Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (24 sloc) 537 Bytes
#!/bin/sh
fakeshell() {
echo
oldifs="$IFS"
IFS=""
read -p "$ " -r COMMAND
IFS="$oldifs"
if [ "$COMMAND" = "exit" ]; then exit; fi
OUTPUT="`eval "$COMMAND"`"
echo "$OUTPUT"
echo
}
BOLD="\033[1m"
NORMAL="\033[0m"
printf "Alright, that looks like what we expected. "
echo "Now lets put something else in there."
OUTPUT=""
while [ "$OUTPUT" != "2nd thing" ]; do
printf "Try typing ${BOLD}echo \"2nd thing\" > saved${NORMAL}. "
printf "Then print the contents of ${BOLD}saved${NORMAL}.\n"
fakeshell
fakeshell
done
./step7