The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ksh scripting help praveenbvarrier Shell Programming and Scripting 1 04-15-2008 07:19 AM
sql scripting help sam786 Shell Programming and Scripting 3 12-10-2007 08:31 AM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 05:12 AM
scripting guru's pls help me with scripting on AIX thatiprashant Shell Programming and Scripting 1 01-20-2006 03:58 PM
Scripting? woofie What's on Your Mind? 1 03-09-2005 03:03 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Jul 2007
Posts: 67
FTP scripting

Hello,

I'm sure this is an easy one for you UNIX pros. I would like to create and and automated an FTP process. The script should do this:

1. Log into a remote system
2. change to a specified directory
3. copy local files to the remote system
4. quit ftp
5. wait until the next schedule

How can I get FTP to do with without user interaction?

Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Jul 2007
Posts: 67
Please Anyone?
Reply With Quote
  #3 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Nov 2007
Posts: 13
I think you can get hint from the following example

syntax
======
ftp -s:test.scr


test.scr file conatins the following things
===============================
open <servername>
userid
password
cd /home/hypadm/ctl
prompt
mget *
bye
Reply With Quote
  #4 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Oct 2007
Posts: 70
ftp with "-i" options disables interactive mode.

man ftp. Find out -i option

ftp -i <servername>
Reply With Quote
  #5 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Jul 2007
Posts: 67
Quote:
Originally Posted by bikas_jena View Post
I think you can get hint from the following example

syntax
======
ftp -s:test.scr


test.scr file conatins the following things
===============================
open <servername>
userid
password
cd /home/hypadm/ctl
prompt
mget *
bye


The -s option works in Windows, but not in UNIX. I tried that before I posted.
Reply With Quote
  #6 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Nov 2001
Location: Flint, MI
Posts: 164
If you do a search of the forums on FTP Scripting you should find many useful examples. Also check out the FAQS section. To automate it you could use cron. Do a search on that and you should find the info you need.
Reply With Quote
  #7 (permalink)  
Old 12-10-2007
Registered User
 

Join Date: Jul 2007
Posts: 67
Quote:
Originally Posted by jyoung View Post
If you do a search of the forums on FTP Scripting you should find many useful examples. Also check out the FAQS section. To automate it you could use cron. Do a search on that and you should find the info you need.

I searched before I posted. "No results". Yeah, I couldn't believe it either.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0