i want to get input and depending on it create new commands for input to expect.
But problem is that after giving date or month as 01-09 it is interpretation as 1-9
echo -n "ENTER DATE "
read d1
echo -n "ENTER MONTH "
read m1
echo -n "ENTER YEAR"
read y1
o=1
i=1
d2=`expr $d1 + 1`
while [ $i -lt $d2 ]
do
d"$o"="ls nc*$i$m1$y1* | wc -l"
echo "$(d$o) \c" >> input_to_expect.txt ########### done for testing purpose only###
i=`expr $i + 1`
o=`expr $o + 1`
done
the expectd output in input_to_expect.txt is
ls nc*010412* | wc -l ls nc*020412* | wc -l ###########and so on as per input####
the actual output required is
the value of d1,d2.......dn ( as per i/p) should be as fallows so that it can be forwarded to expect