LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2006, 01:36 PM   #1
bokini
LQ Newbie
 
Registered: Oct 2003
Posts: 9

Rep: Reputation: 0
bash script AND ftp


Hello, im doing a bash script and during the script a need to send a file into a FTP, so my question is how to do that or where to start.
 
Old 01-04-2006, 02:05 PM   #2
eldoran
LQ Newbie
 
Registered: Apr 2005
Location: Black Hawk, Colorado
Distribution: Ubuntu
Posts: 26

Rep: Reputation: 15
'man ftp' is a start.. you can issue a command like 'ftp ftp://userassword@host/path'. If ssh is available on the host - I prefer 'scp' because you can set up ssh keys and not have to deal with passwords. In any case - look at the ftp doc.
 
Old 01-04-2006, 04:33 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You can put any legal bash command in a script. The trick is to correctly intercept the messages that come back (eg from ftp), and handle them in a predictable way.

Here is a utility that puports to help with this--I have not tried it.

http://expect.nist.gov/

Specifically for FTP, I am surprised there is not some kind of friendly front -end for linux---or maybe there is...
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using BASH script to transfer a file via (s)ftp senther Linux - Newbie 2 07-19-2005 04:47 PM
how to while in a ftp bash script dezeque Programming 3 06-12-2004 04:13 PM
bash script+ftp+ls->var g00ral Programming 1 05-05-2004 06:58 AM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
bash script prob: how can i tell the script that a 'dd' has finished? Frustin Linux - General 2 04-02-2003 05:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:49 AM.

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