• Post Reply Bookmark Topic Watch Topic
  • New Topic

korn shell script

 
arianne ranillo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone!i need help..i don't know how to fix errors in my script..i need to get and put data in other machine using ftp..please help me..thanks!


#!/bin/ksh

REMOTE='000.000.0.000'
USER='xxx'
PASSWORD='xxx'

source_dir='cd /usr/src'
target_dir='cd /usr/src'

ftp -n $REMOTE <<_FTP
quote USER $USER
quote PASS $PASSWORD

bin
lcd $source_dirpeed
cd $target_dir

put sample.txt
bye
_FTP
exit



error:

ftp: connect: Connection refused
Not connected.
Not connected.
Not connected.
Local directory now /root
Not connected.
Not connected.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!