The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 03:19 AM
ftp issue ravi raj kumar Shell Programming and Scripting 5 02-06-2008 04:24 AM
awk issue on AIX ranj@chn Shell Programming and Scripting 1 07-04-2007 03:22 AM
Issue with rsh sriram.s AIX 5 07-03-2007 08:37 AM
FTP Issue, Help please moe2266 UNIX for Dummies Questions & Answers 0 01-17-2006 06:54 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-28-2006
Registered User
 

Join Date: Jul 2006
Posts: 58
FTP issue

I have tried to ftp from unix to local window machine. I have taken this piece of code from forum and tried ...
HTML Code:
#!/bin/ksh
#Usage example: ftpscript sanjit.txt C:/citi/readme.txt
localFile=$1
remoteFile=$2

ftplog=loglog.log
echo "$(date "+%H:%M:%S") - Attempt to FTP $1 to $2" > $ftplog

# do the FTP put

ftp -i -n <<EOF >> $ftplog
open 182.101.11.166
user user password
put $localFile $remoteFile
ls $remoteFile
quit
EOF
But once executing the script, nothing have been responded from the unix.Simple i am comming out by Ctrl C.

I have checked :
$ uname is SunOS

Can anyone tell is something goes wrong the above code or should something need to set in Unix only.

There are few query posted seems Solaries does have some other limiation. Can any Unix Guru address this??

Thanks in advance
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-28-2006
Dhruva's Avatar
Registered User
 

Join Date: Mar 2006
Location: India
Posts: 241
First this should be in "here document" like

Z1=`ftp -i -n <<EOF >> $ftplog
open 182.101.11.166
user user password
put $localFile $remoteFile
ls $remoteFile
quit
EOF`

can you tell us what error you are getting or check it from log file.I guess you dont have ftp services running on your windows box.You can install with your OS install cd.

Last edited by Dhruva; 07-28-2006 at 04:55 AM.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:41 PM.


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

Content Relevant URLs by vBSEO 3.2.0