Hi,
I am writting a script. i am not sure what i am trying to do is possible or not. thats why asking the best of the best.
the script i want to write will recieve as input parameters 2 different options.
as in
MODE 1
-- start_date / end_date (2 dates has 2 go at a time
MODE 2
-- start_model_no. / end_model_no.
the script will be generating the records within this interval of dates in mode1 (taking into account the start date) or within the range of model_no. in Mode 2.
any ideas how is this suppose to be done. i can use getopts() for putting 2 different modes but how will i pass the range??
(am i thinking in correct lines or is there any other way to do this)
see below :-
while getopts D:M: PARAMETERS
do
case ${PARAMETERS} in
D) DATE=$OPTARG;;
M) MODEL_NUMBER=$OPTARG;;
*) A_ERR=1
esac