LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-17-2007, 03:21 AM   #1
chnlinux
LQ Newbie
 
Registered: Jun 2007
Posts: 28

Rep: Reputation: 15
Regarding FTP script


Hi ,

I want a UNIX FTP script to transfer a file from one server to another server.
Then use that FTP script in command task to execute.
Please find the script I have created.
#!/bin/sh
ftp
open myserver.com
userid\pw
ASCII
lcd /apps/informatica/powercenter/server/TgtFiles/ods/helix/output
mput HelixProduct*.xml
close quit

I want to test between the two servers and make it as a executable unix script


Thanks&Regards,
CHN
 
Old 07-17-2007, 07:30 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Fine. What's your question?
 
Old 07-17-2007, 08:48 AM   #3
spaniel
Member
 
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48

Rep: Reputation: 15
He probably wants us to write the script for him/her...........

And since i am in a good mood and going on vacation in two days...........

------------------------------------------
#!/bin/bash
MYUSERNAME=<put in your username>
MYPASSWORD=<put in your password>
MYHOST=<put in the ip-address or hostname>

ftp -n $MYHOST <<EOF
user $MYUSERNAME $MYPASSWORD
ASCII
lcd /apps/informatica/powercenter/server/TgtFiles/ods/helix/output
mput HelixProduct*.xml
bye
EOF
------------------------------------------
Save it to a file, "chmod +x" it and have fun
 
  


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 Script tommytomato Linux - General 28 07-14-2006 06:16 AM
Urgent Help: Perl FTP Script Using NET::FTP xboxter Programming 8 05-16-2005 07:57 PM
Ftp script scialom Linux - Software 2 05-04-2004 04:03 PM
FTP script Veteq Programming 3 04-21-2004 01:32 PM
ftp script dlm4444 Linux - Networking 5 02-11-2004 12:41 AM


All times are GMT -5. The time now is 04:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration