The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-10-2008
leimrod leimrod is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
Quote:
Originally Posted by Franklin52 View Post
Try something like this:

Code:
#!/bin/sh

Y=`date "+%Y"`
m=`date "+%m"`
d=`date "+%d"`

cd /location/of/DB/backup

ftp -i -n <<EOF
open "hostname"
user "user" "passwd"
mkdir "$Y"/"$m"/"$d"
cd "$Y"/"$m"/"$d"
put test.txt
quit
EOF
Regards
Kudos! That works perfectly Much appreciated, you've made this Irishman very happy, I have one less job today, lol