Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 30 lines (24 sloc) 0.668 kB
#!/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"
echo "Great! Wasn't that easy?"
echo
echo "Commands actually take a list of things, called ${BOLD}arguments${NORMAL} or ${BOLD}parameters${NORMAL}."
printf "${BOLD}echo${NORMAL} just prints out the whole list, but if you wanted to give it just one item, you could put double quotes around the item.\n"
OUTPUT=""
while [ "$OUTPUT" != "Hello, world!" ]; do
printf "Try typing ${BOLD}echo \"Hello, world!\"${NORMAL}.\n"
fakeshell
done
./step3
Jump to Line
Something went wrong with that request. Please try again.