LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-13-2009, 11:56 AM   #1
tazer92
LQ Newbie
 
Registered: May 2009
Posts: 3

Rep: Reputation: 0
FTP script with user prompting/redirects/renaming


hi,

i am really new to scripting. i would like to know what examples i can use to have an ftp script created.

here are the objectives:

1. prompt to login to the ftp site
2. turn off prompt, switch to bin mode
3. prompt to go "cd" to a certain directory
4. prompt for a version number of the file(s)
5. prompt to create a download folder on the local machine

please let me know if this is enough information.
 
Old 05-13-2009, 12:11 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,453

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
It looks like homework. What have you tried so far? What is not clear? Take a look at
Code:
man ftp
and you will find all the answers. For example to turn off interactive prompting when doing multiple file transfer you can try the -i option. Consider that in a script you can pass all the ftp commands as standard input. To do this use a so called "here document". Looking at the man page you can easily find the answer to the last question, which is maybe a "trick" unknown to a lot of people.
 
  


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
shell or perl script to change ftp user password vivek rai Linux - Newbie 4 03-15-2009 01:09 PM
Prompting a user for a password within a script kaplan71 Linux - Software 4 09-10-2007 01:38 PM
Script to ftp-invite irc-user on psybnc Scorp-D Linux - Software 0 06-20-2006 03:00 PM
script 'prompting with timeout' question WindowBreaker Slackware 2 03-09-2006 12:44 PM
ftp server auto renaming? JustinHoMi Linux - Networking 0 12-07-2001 10:31 PM


All times are GMT -5. The time now is 02:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration