Script n00bie needing some help.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Juland Re Perales, R
Date:  
Subject: Script n00bie needing some help.
Thanks for the help, guys!

I got it working! Here's how it looks like now....


>script<


### Display a 2-line prompt for input until no input s received.

input="a"
nullvar=""
echo "Word and Character Counter..."


                                        ###To prompt user to type words
while [ "$input" != "$nullvar" ]
  do
   echo "Type one or more words, then press <Enter>"
   echo "To end, just press <Enter>"
   read input                           ###To exit program or display count
output
   if [ "$input" = "$nullvar" ] ###ifempty then you will exit
    then
     echo Exiting Program...
    else
     echo You typed `echo $input | wc -w` words and `echo $input | wc -c`
characters
     echo                               ###to insert blank line
fi
done


>/script<




Feels pretty good to be done with it.
Doesn't have to be just two words.
Thanks again!