Results 1 to 2 of 2
Hi,
Need help on the unix scripting. Below is the unix script, the logic is to ftp the files from the windows server to the UNIX server. The script is ...
- 09-20-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 1
Need help on the UNIX scripting guys..
Hi,
Need help on the unix scripting. Below is the unix script, the logic is to ftp the files from the windows server to the UNIX server. The script is run from the UNIX.
Eg:
#/bin/ksh
#!Reuters Dealing 3000 - FTP Script
#!vijay antony - 20030811
# This script handles conversation and gets file from
# reuters dealing 3000
# $0 : Name of script
# $1 : 1st argument: Remote Ip adress
# $2 : 2nd argument: Remote Directory
# $3 : 3rd argument: File Name
# $4 : 4th argument: Input Directory
# $5 : 5th argument: ftp temp file name
# $6 : 6th argument: ftp log file name
# $7 : 7th argument: ftp user name
# $8 : 8th argument: ftp user password
dt=`date +"%H%M%S"`
ftp -n -v $1 <<EOF>> $6
user $7 $8
echo "logged in"
cd $2
prompt
mdir $3 $5
bye
EOF
for i in `awk '{print $9}' $5 `
do
echo 'getting file '$i >> $6
ftp -n -v $1 <<EOF>> $6
user $7 $8
cd $2
cd $3
lcd $4
get $i
delete $i
bye
EOF
done
exit 0
Below is the log identified.
Connected to 172.17.0.35.
20 Microsoft FTP Service
331 Password required for administrator.
230 User administrator logged in.
?Invalid command
550 D:RTS: The system cannot find the file specified
Interactice mode off
200 PORT command successful
150 Opening ASCII mode data connection for /bin/ls
550 RTS.IN: The system cannot find the file specified
The Arguments ran manually from the shell.
Jsh ~>sh
$cd /t24app/app/t24test/jbltec/bnk/bnk.run/GRID.BP;ftp3k.sh 172.17.0.53 D:\RTS RTS.IN /t24app/app/t24test/jbltec/bnk/bnk.run/RTS.IN /t24app/app/t24test/jbltec/bnk/bnk.run/REU.ADM/RTS.TEMP /t24app/app/t24test/jbltec/bnk/bnk.run/REU.ADM/RTS.LOG administrator 654321
Kindly help for the solution.
- 09-21-2011 #2Just Joined!
- Join Date
- Aug 2011
- Posts
- 48
I think it is the '\' in the D:\ that is giving you the issue.
Try using quotes "D:\RTS"


Reply With Quote