Hi
I use One linux server to download Log files from 90 NT servers at a time using a script. I made a script and its working fine. The log file name is same in all servers. After downloading to the linux box the log file will be renamed to a name which depends on the system date.
But my problem is to rename the log file named Bupdate.log to $date.Bupdate.log in the NT server to avoid downloading the full log again. I could not find any date variable in the ftp client.
script attached
Script 1
=============
cd /home/sigcap/sigcap
exec 4</home/sigcap/sigcap/ipaddress
while read IP <&4
do
TODAY=`date '+%d%m%y'`
ip=${IP}
ftp -vin $ip < /home/sigcap/sigcap/ftp_sigcap.sh 2>&1
mv /home/sigcap/sigcap/BUpdate.log /home/sigcap/BUpdate${TODAY}${IP}.txt
sleep 1
done
exec 4<&-
Script 2
==========
user sigcap sigcap1
cd /main/changes
pwd
ascii
get BUpdate.log
rename BUpdate.log date.Bupdate.log
close
quit
Please revert your openions
Thanks
SKR
I use One linux server to download Log files from 90 NT servers at a time using a script. I made a script and its working fine. The log file name is same in all servers. After downloading to the linux box the log file will be renamed to a name which depends on the system date.
But my problem is to rename the log file named Bupdate.log to $date.Bupdate.log in the NT server to avoid downloading the full log again. I could not find any date variable in the ftp client.
script attached
Script 1
=============
cd /home/sigcap/sigcap
exec 4</home/sigcap/sigcap/ipaddress
while read IP <&4
do
TODAY=`date '+%d%m%y'`
ip=${IP}
ftp -vin $ip < /home/sigcap/sigcap/ftp_sigcap.sh 2>&1
mv /home/sigcap/sigcap/BUpdate.log /home/sigcap/BUpdate${TODAY}${IP}.txt
sleep 1
done
exec 4<&-
Script 2
==========
user sigcap sigcap1
cd /main/changes
pwd
ascii
get BUpdate.log
rename BUpdate.log date.Bupdate.log
close
quit
Please revert your openions
Thanks
SKR