Reverse FTP | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

Reverse FTP

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-22-2007
ganesh123 ganesh123 is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 18 May 2010, 1:43 PM EDT
Location: Milwaukee
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old 02-22-2007
awk awk is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 29 May 2012, 11:56 AM EDT
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
$!/bin/ksh

ftp <destination machine ID> <<END_SCRIPT
cd <whatever directory>
get <filename>
quit
END_SCRIPT
Sponsored Links
    #3  
Old 02-22-2007
ganesh123 ganesh123 is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 18 May 2010, 1:43 PM EDT
Location: Milwaukee
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you awk.
    #4  
Old 02-22-2007
awk awk is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 29 May 2012, 11:56 AM EDT
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #5  
Old 02-22-2007
ganesh123 ganesh123 is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 18 May 2010, 1:43 PM EDT
Location: Milwaukee
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
I dont get you awk.

Becoz I have to get the file from my D: drive of my client PC which is on Windows.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cut or awk in reverse cbo0485 Shell Programming and Scripting 9 05-16-2011 09:16 AM
Reverse DNS GRMrGecko IP Networking 4 04-23-2010 01:19 AM
Reverse multiword lipun4u Shell Programming and Scripting 3 02-16-2010 02:59 AM
how to reverse file RahulJoshi Shell Programming and Scripting 3 10-08-2008 03:32 AM
Reverse * azmathshaikh Shell Programming and Scripting 2 04-26-2005 07:40 AM



All times are GMT -4. The time now is 02:13 AM.