The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-18-2006
Registered User
 

Join Date: Jul 2006
Posts: 49
ftp question???

Hi

Look at the below:

ftp -i novellftp
user $LOGIN
pass $PASSWORD
bin
cd //stecnv16/data/shared/public2/gui/webhelp
mget help.zip
bye
unzip help.zip
rm help.zip
mv help WebHelp
exit;;

know i want to write the above commands in script. but when my first command execute it is asking LOGIN and Passowrd, it was not taking though i have defined in variables, can someone look at tell me waht was the wrong i am doing...

when i execute the above i get the below

Connected to stecnv08.bjuhealth.com.
220 Service Ready for new User
Name (novellftp:g_gkc):

what way i can write the script so that, i can go with out entering my userid and password

Last edited by gkrishnag; 09-18-2006 at 03:49 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 09-18-2006
Dhruva's Avatar
Registered User
 

Join Date: Mar 2006
Location: India
Posts: 255
use here document

Code:
ftp -ivn << !
open $1 
user $2 $3 
close
bye
!
check these links

this
this
Reply With Quote
  #3  
Old 09-18-2006
Registered User
 

Join Date: Jul 2006
Posts: 49
Not working???

#!/bin/sh
#
USERNAME=.gg900079.irock.symbosis
PASSWORD=hello!23
ftp -i novellftp << EOF
user $USERNAME $PASSWORD
bin
cd //stecnv16/data/shared/public2/gui/webhelp
mget help.zip
bye
EOF

when i run the abo/home/cvs ->ftp.sh
Password:Name (novellftp:g_gopala):
Login Failed for User user
Login failed.
Cmd Failed - Login using User and Pass
Cmd Failed - Login using User and Pass
Cmd Failed - Login using User and Pass
can't find list of remote files: No such file or directoryve i get the below error:

can you please correct the below...
Reply With Quote
  #4  
Old 09-18-2006
Registered User
 

Join Date: Feb 2006
Location: msk.ru.earth
Posts: 43
Quote:
ftp -i novellftp
user $LOGIN
pass $PASSWORD
bin
cd //stecnv16/data/shared/public2/gui/webhelp
mget help.zip
bye
change this to
ftp ftp://$user:$pass@$host/path_to_file
where user, pass and host -- your variables
Reply With Quote
  #5  
Old 09-18-2006
Registered User
 

Join Date: Jul 2006
Posts: 49
Hi

i have the ftp as

/home/cvs ->nslookup novellftp
Using /etc/hosts on: gort

looking up FILES
Trying DNS
Name: stecnv08.gamesbsi.com
Address: 192.18.15.17
Aliases: novellftp.gamesbsi.com

how can i put the above, i am trying as below and that is throwing error!!!

ftp ftp://.gg900079.gamesbsi.tech:hello!23@novellftp.gamesbsi.com //stecnv16/data/shared/public2/gui/webhelp

i am getting the error as below
usage: ftp host-name [port] .. can you please correct me
Reply With Quote
  #6  
Old 09-18-2006
Registered User
 

Join Date: Feb 2006
Location: msk.ru.earth
Posts: 43
Ok.
Which OS do you use?

(command syntax may be different in several OSes. My example was to FreeBSD)
Reply With Quote
  #7  
Old 09-18-2006
Registered User
 

Join Date: Jul 2006
Posts: 49
Hi

we use solaris
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:44 AM.


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

Content Relevant URLs by vBSEO 3.2.0