#!/bin/sh # this demonstrates the if-then construct # as well as demonstrating the read and test builtins #notice that I use double quotes around the $word variable #that way if a user running the program enters 2 words, they work #the -n after the echo tells the shell not to output a newline after #the echo echo -n "word 1:" read word1 echo word 1 is "$word1" #now see how I am evaluating the variable word1 and word 2 echo -n "word 2:" read word2 echo word 2 is "$word2" #to reference the value of a variable You do not NEED the "" around it #notice that the test builtin (p. 371) has 3 arguments if test "$word1" = "$word2" then echo "The words that you entered were a Match" fi echo echo echo "this program is done, please try again if you like" #