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 > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: FTP automated?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-11-2001
mib mib is offline
Registered User
  
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
#!/bin/bash
#autoftp.sh
# use "\n" to seperate entry
# and use binary instead ascii if you think

FTPCommand="cd FTPdirectory\nascii\nput $1.backup.file\nbye"
echo -e $FTPCommand | ftp machine
echo "$1 Ftp'd to machinename"

and run this script to ftp "today.backup.file"

# ./autoftp today

Be sure to include full path if "today.backup.file" file is not in the directoy from where you execute the script.


HTH

[Edited by mib on 05-11-2001 at 07:29 AM]