ftping from a script file transfer incomplete
I am putting a file using ftp from within a Korn shell script. The script runs fine from the command prompt but only part of the file transfers when it is run from crontab. Any help is greatly appreciated.
Thanks, Pelargonium |
Any consistency in the length of the transfered chunks,
how many bytes are you getting, what does the crontab- entry look like? Cheers, Tink |
Howdy Tink. Thanks for the reply.
Yes, I am consistenly getting 1k of the file transferred. The crontab entry is: 18 16 * * * time -p /mypath/myscript.sh. The script is running but the file gets chopped. The code within is script is: #!/bin/ksh echo " user <username> <password> bin pass hash put <filename>.sh " | ftp -i -v -n <hostname> >> <logfile on unix box> 2>&1 Phew! Did you catch all that? |
I found the problem. When you use crontab your environment variables change. Therefore you need to explicitly set the path for the file you are sending (putting). Otherwise it may use one in a different directory. Thanks for all the help!
Ciao! |
All times are GMT -5. The time now is 05:33 PM. |