The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
invoking a shell script inside cgi shell script smriti_shridhar Shell Programming and Scripting 2 07-08-2008 10:50 PM
Accessing variables of one shell script in another shell script looza Shell Programming and Scripting 2 06-30-2008 04:13 PM
How to pass a parameter from one Shell-script to another Shell-script subodhbansal Shell Programming and Scripting 2 09-22-2007 02:19 AM
How to Run a shell script from Perl script in Parent shell? hifake Shell Programming and Scripting 16 08-28-2007 05:42 PM
Accessing variables of one shell script in another shell script rsendhilmani Shell Programming and Scripting 1 04-30-2007 05:43 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-15-2008
Registered User
 

Join Date: Nov 2007
Posts: 55
FTP in shell script

HI ALL

i am writing a shell script in which i have to use FTP command like.
FTP <ip address>
cd xyz
mget*
bye

but i am not able to perform any command from shell script.
once the control goes to FTP, i again have to type all the things.
i just want my shell script to take care of the commands wrritten above.

please help me to automate the process
Reply With Quote
Forum Sponsor
  #2  
Old 07-15-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 958
If you search the web for example via Google and use the words "ftp shell script" you get tons of hits with examples. You can also look for "Here Scripts".
Reply With Quote
  #3  
Old 07-15-2008
Registered User
 

Join Date: Nov 2007
Posts: 55
Quote:
Originally Posted by zaxxon View Post
If you search the web for example via Google and use the words "ftp shell script" you get tons of hits with examples. You can also look for "Here Scripts".

thanks for your reply.
actually ia m looking for how to use mget * command.
for every file to get it requires a key press.
i am not sure how to do this.
plz help.
Reply With Quote
  #4  
Old 07-15-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 958
There is the ftp command "prompt" which will make it non-interactive or there will be also a switch for ftp like -i.
Reply With Quote
  #5  
Old 07-15-2008
Registered User
 

Join Date: Nov 2007
Posts: 55
that was brilliant!!

thanks a lot
Reply With Quote
  #6  
Old 07-15-2008
jhtrice's Avatar
Registered User
 

Join Date: Jun 2008
Posts: 63
Depending on what you're doing using the wget command might be easier.
Reply With Quote
  #7  
Old 07-17-2008
Registered User
 

Join Date: Jul 2008
Location: Reno, NV
Posts: 1
an expect script would do the job nicely too.. don't you pass the login and password in the ftp script?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:04 AM.


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

Content Relevant URLs by vBSEO 3.2.0