LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2010, 01:09 AM   #1
harsh_datir
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
FTP Automation script


how to use FTP script using while loop.
 
Old 12-01-2010, 01:25 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400
Hi,

You can put a HERE-DOCUMENT inside the while loop to address the ftp commands.

Rough example:
Code:
....
....
while read SOMETHING
do
ftp destination <<HEREDOC
cd somewhere
get $SOMETHING
bye
HEREDOC
...
...
done
The bold parts is the HERE DOCUMENT, all in between is given to ftp to process.

Hope this helps.

Last edited by druuna; 03-01-2011 at 02:24 PM. Reason: spelling
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp automation script lipun4u Linux - Newbie 1 07-16-2010 02:03 PM
FTP automation question.. mikidouglas Linux - Software 4 02-25-2009 07:56 AM
Automation script vijayan361 Linux - Newbie 7 01-23-2009 06:42 AM
LUKS automation script jippo Linux - Security 6 01-12-2008 12:56 AM
ftp automation Mad_C Linux - General 12 09-15-2003 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration