The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-15-2008
amatuer_lee_3 amatuer_lee_3 is offline
Registered User
 

Join Date: May 2008
Posts: 53
limiting data inputs for the user

if my user has to enter the name of months to carry out a search how can I limit the input values to only the month names and nothing else?

so far my input criteria for the user is this:

Quote:
echo " "
echo "Enter the month in which you wish to search
(Please enter months in the form of Jan, Feb, Mar, etc...): "

read MONTH

grep $5 "$MONTH" tempfile > tempmonth
i would like it so the user can only enter the months in the way i have stated. otherwise they would get an error message.
Reply With Quote
Forum Sponsor