TFTP script for PIX firewall's to a Linux box

Yeah I hate to say it but we are TFTPing our backup configs to a TFTP server even though to log into the server we use ssh.  Sometimes I just hate the Cisco IOS or maybe I am to stupid to figure out how to scp these suckers from there.  Anyhow if anyone is still TFTPing here is a basic script to touch the file so you can write it to the server.  Probably just need to update the IOS.  :)


echo -e "Please enter firewall name: \c "
read firewall
date1=$(date | awk {'print $2 "-" $3 "-" $6 "-" $4'} | sed s/:/-/g)
touch1=$(touch $fwvar)
chmod1=$(chmod 777 $fwvar)
echo "Your filename is: $fwvar"


Copy your filename and then go to the firewall and and wr net :filename (if you set your tftpserver in the config)  if not then wr net ipaddress:filename

remember to chmod your directory or file back to 700 or just so that everyone does not have rwx.  I tested this and it was needed to upload the stupid file.