The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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-03-2006 02:24 AM
Reverse Proxy dipanrc Linux 0 12-27-2005 10:05 AM
string in reverse malaymaru Shell Programming and Scripting 4 10-18-2005 11:32 AM
Could not reverse map address nadav UNIX for Dummies Questions & Answers 2 08-05-2005 01:23 PM
Reverse * azmathshaikh Shell Programming and Scripting 2 04-26-2005 07:40 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-22-2007
ganesh123 ganesh123 is offline
Registered User
  
 

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
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.
  #2 (permalink)  
Old 02-22-2007
awk awk is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 134
$!/bin/ksh

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

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
Thank you awk.
  #4 (permalink)  
Old 02-22-2007
awk awk is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 134
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
  #5 (permalink)  
Old 02-22-2007
ganesh123 ganesh123 is offline
Registered User
  
 

Join Date: Feb 2007
Location: Milwaukee
Posts: 24
I dont get you awk.

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0