Two Laptop Bag*
The moose likes Linux / UNIX and the fly likes korn shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "korn shell script" Watch "korn shell script" New topic
Author

korn shell script

arianne ranillo
Greenhorn

Joined: Sep 24, 2012
Posts: 1
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: korn shell script