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
rsh connection problem ravi raj kumar Shell Programming and Scripting 1 02-08-2008 09:00 AM
ftp connection problem krishna176 SUN Solaris 2 03-24-2007 03:16 PM
rsh problem connection refused Mace Shell Programming and Scripting 4 06-12-2006 10:28 PM
FTP connection problem on new server miredale UNIX for Dummies Questions & Answers 1 10-04-2002 06:42 AM
FTP connection problem cassy IP Networking 11 09-09-2002 05:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-17-2008
ravi214u ravi214u is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 19
FTP connection problem

I am getting the error in this command when i am pitting it in shell script

HTML Code:
ftp -nvi jcmpcor1.abc.com >/work/test98.dat << EOD

error:-
invalid command.

but when i am writting it from outside it work fine.
  #2 (permalink)  
Old 07-17-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
What shell does your script use?
  #3 (permalink)  
Old 07-17-2008
ravi214u ravi214u is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 19
thanks for reply

We are using SH
  #4 (permalink)  
Old 07-17-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
What commands do you have after it, before the "EOD"?
  #5 (permalink)  
Old 07-17-2008
ravi214u ravi214u is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 19
after that

#Authenticate the user
#user $username $password
user odsftp ods123$

#Change FTP mode to binary
bin
#echo "mode changed to binary"
#Change local directory
#lcd $localDir
lcd /work/tt

#Change remote directory to directory where source files are present
#cd $remoteDir
cd /apps/RStuff/ecm/amazon/adw/incoming/
#echo pwd
#echo "Directory changed ..."
#FTP all files to local directory with the specified filename format
#echo $remoteDir
#mget $strfilename
cp dq1234 /work/
#echo $strfilename
#echo `wc -l $localDir/$strfilename`

#Close FTP connection
close
bye
EOD
  #6 (permalink)  
Old 07-17-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
"cp" is not a valid FTP command.
  #7 (permalink)  
Old 07-17-2008
ravi214u ravi214u is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 19
wat should in place of cp
Sponsored Links
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 08:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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