The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
reverse of basename braindrain Shell Programming and Scripting 7 10-02-2006 11:24 PM
Reverse Proxy dipanrc Linux 0 12-27-2005 06:05 AM
string in reverse malaymaru Shell Programming and Scripting 4 10-18-2005 08:32 AM
Could not reverse map address nadav UNIX for Dummies Questions & Answers 2 08-05-2005 10:23 AM
Reverse * azmathshaikh Shell Programming and Scripting 2 04-26-2005 04:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2007
Registered User
 

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
Stumble this Post!
Reverse FTP

Hi Everybody,

I want to write a script in unix which will automatically FTP a .txt file from my client machine D: drive(Windows)

That is I want to FTP a file from my PC to UNIX box but this should be done from UNIX box by a shell script. (i.e. I will invoke the script in UNIX and FTP will be done)

Let me know if I have made this clear ? Any help would be appreciated.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-22-2007
awk awk is offline
Registered User
 

Join Date: Feb 2007
Posts: 115
Stumble this Post!
$!/bin/ksh

ftp <destination machine ID> <<END_SCRIPT
cd <whatever directory>
get <filename>
quit
END_SCRIPT
Reply With Quote
  #3 (permalink)  
Old 02-22-2007
Registered User
 

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
Stumble this Post!
Thank you awk.
Reply With Quote
  #4 (permalink)  
Old 02-22-2007
awk awk is offline
Registered User
 

Join Date: Feb 2007
Posts: 115
Stumble this Post!
For that on our systems, we have a .netrc (do man on netrc to see what the file format is) that has the machine/user/password information in there.

If you don't have that capability - put the user id/password in the script as the first line after the ftp
user <userid> <userpassword> # to do the logon the remote machine

good luck
Reply With Quote
  #5 (permalink)  
Old 02-22-2007
Registered User
 

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
Stumble this Post!
I dont get you awk.

Becoz I have to get the file from my D: drive of my client PC which is on Windows.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:33 PM.


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

Content Relevant URLs by vBSEO 3.2.0