I have a data in a file called SCHED which has 5 columns: sched no, date, time, place and remarks. The image is shown below.
Now, I want to display only the schedules which fall under a certain date range which the user has to input. For example the start date is 21/12/2012 and the end date is 03/01/2013, the output should then be the first 3 records because they fall under that range.
btw, i am using a dialog utility for the calendar so when i select a date, its format is automatically dd/mm/yyyy. This is how i assigned the selected date to a variable:
USERDATE=`dialog --nocancel --stdout --title "My Calendar" --calendar "Select a date:" 0 0 -1 -1 -1`
that and the other data like sched no, time, place and remarks go to a file called SCHED.
Any idea on how I can do this? I basically have no idea on how I am going to compare the user input (start date and end date) to the dates on the file. Please help me. I am a newbie shell script programmer.