#12:30 AM 10/29/2004 #Dirk Fretz - dbfretz - Lab 12 #Display a 2 line prompt for input until no input is received clear #Start with a clear screen echo #Line breaks for ease of read input=input #Establish loop variable while [ -n "$input" ] #While input is a non-zero string do echo "Type one or two words, then press " #Input instructions echo echo "[Or]" #Option echo echo "To end this program, just press " #End program instructions echo read input if [ -z "$input" ] #If no user input, exit then echo echo "Exiting program. Good-Bye." echo echo else #If user input, display wc count echo echo You typed `echo $input|wc -w` word\(s\) and `echo $input|wc -c` characters echo echo fi done