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
The here document << rahulrathod Shell Programming and Scripting 6 01-23-2006 12:05 AM
Teaching myself Here Document ericelysia UNIX for Dummies Questions & Answers 3 10-31-2005 12:33 AM
echo with a here-document vino Shell Programming and Scripting 2 08-19-2005 09:48 AM
How to split a document gtapia Shell Programming and Scripting 2 07-15-2004 05:25 PM
Help on find a document merlin UNIX for Dummies Questions & Answers 1 02-14-2002 08:42 PM

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 01-15-2008
JamesByars JamesByars is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 124
here document not working

I tried doing

Code:
ftp myhost <<HERE
username
password
quit
HERE
but it doesnt work. Why?

When I do ftp host, I always get prompted for username, and once I type that in I get prompted for password. But when I try doing it from here document it freezes.
  #2 (permalink)  
Old 01-15-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,209
Have you tried searching? There are hundreds of similar threads on automating ftp.
  #3 (permalink)  
Old 01-15-2008
JamesByars JamesByars is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 124
hi reborg,

yes, I did actually search this forum and found a good answer (using ftp -i -n), so I have managed to get around this. But I am still curious as to why what I did initially did not work. I thought a here document sends input line by line to the command, so I would have expected it to work.
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 10:05 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