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 -->
  #9 (permalink)  
Old 05-15-2008
amatuer_lee_3 amatuer_lee_3 is offline
Registered User
 

Join Date: May 2008
Posts: 53
now that i have done it for months

how do i restrict user inputs for date based on the month chosen?

is it:

Code:
while true; do 
  echo " "
  echo "Enter Date of the Month (1-31): "
  read DATE
  case $DATE in [1-31]);;
  *) echo " "
  echo "Invalid date, try again" >&2;;
  esac
done

grep $4 "$DATE" *.hits >tempfile
Reply With Quote