Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: d86f2cf6eb
Fetching contributors…

Cannot retrieve contributors at this time

executable file 32 lines (26 sloc) 0.788 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 "Welcome to the TrySh tutorial!"
echo
echo "The first thing you need to know to operate your shell effectively is how to run a command."
echo "To run a command that has been installed on your system, simply type its name, followed by the information you want the command to use."
printf "One such command is called ${BOLD}echo${NORMAL}.\n"
printf "${BOLD}echo${NORMAL} simply prints out whatever information you pass it.\n"
OUTPUT=""
while [ "$OUTPUT" != "Hello, world" ]; do
printf "Try typing ${BOLD}echo Hello, world${NORMAL}.\n"
fakeshell
done
./step2
Jump to Line
Something went wrong with that request. Please try again.