Win a copy of Design for the Mind this week in the Design forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic