I have written a shell script below while running this script , we have to give inputs manually, now i want that we are getting inputs in excel file ..can we automate this , this was a project for me , i am alreday late ..please help me soon
#!/bin/bash
echo -e "CREATION OF NEW MRTG LINK "
echo -e "Enter Configuration File Name "
read cfg_filename
echo -e "Enter Customer Name To Be Displayed "
read cust_name
echo -e "Enter Short Name "
read short_name
echo -e "Enter SNMP String "
read string
echo -e "Enter Router/Switch name "
read router_name
echo -e "Enter Router/Switch IP "
read router_ip
echo -e "Enter Port Details Along with "
read port_dtls
echo -e "Enter WAN IP Address "
read wan_ip
echo -e "Enter BW Allocated "
read bw
lower=`echo $short_name | tr 'A-Z' 'a-z'`
bw_config=`echo $bw/8*1000 | bc`
echo "Directory[$lower]:$lower">>/cfg/$cfg_filename
echo "Target[$lower]: -$port_dtls:$string@$router_ip:">>/cfg/$cfg_filename
echo "MaxBytes[$lower]:$bw_config">>/cfg/$cfg_filename
echo "Title[$lower]:Traffic Analysis for $cust_name.">>/cfg/$cfg_filename
echo "PageTop[$lower]: <H1>Traffic Analysis for $cust_name.</H1>">>/cfg/$cfg_filename
echo " <TABLE>">>/cfg/$cfg_filename
echo " <TR><TD>Max Speed:</TD><TD>$bw Kbps</TD></TR>">>/cfg/$cfg_filename
echo " <TR><TD>Port@Router/Switch:</TD><TD>$port_dtls:@$router_name</TD></TR>">>/cfg/$cfg_filename
echo " <TR><TD>Wan Ip:</TD><TD>$wan_ip</TD></TR>">>/cfg/$cfg_filename
echo " </TABLE>">>/cfg/$cfg_filename
tail -10 /cfg/$cfg_filename
filename=`echo $cfg_filename |cut -d . -f 1`
echo $filename
echo $lower
#echo "For Creating Index File For MRTG User"
echo "Creating Directory"
mkdir /home/www/mrtg/$filename/$lower
echo "Directory Created for $lower"
echo "Creating index for $lower"
sleep 5
cat /root/scripts/index.html | sed s/eswarthemad.html/$lower.html/g > /root/scripts/tmp.html
cp /root/scripts/tmp.html /home/www/mrtg/$filename/$lower/index.html
cho "Created index for $lower"