![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calling a script from a level above where the script resides | SummitElse | UNIX for Advanced & Expert Users | 2 | 10-26-2007 06:27 AM |
| calling a script from another | madhu_aqua14 | UNIX for Dummies Questions & Answers | 2 | 02-27-2007 03:16 AM |
| Box A's perl script calling box B's shell script | new2ss | Shell Programming and Scripting | 1 | 09-13-2006 03:17 AM |
| calling dos2unix on shell script from within the script | vino | Shell Programming and Scripting | 4 | 04-08-2005 12:38 AM |
| Calling a script from another | dnkansah | Shell Programming and Scripting | 5 | 09-02-2004 04:02 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Unable to FTP while calling another script
Hi,
I am trying to use a generic script called ftp_master.ksh and use it in my script to FTP multiple files and log them. But I am unable to do so. I am not sure where I am going wrong... My script: Code:
SERVER=$1
REMOTE_FILE_PATH=$2
file_count=`expr $# - 3`
echo "Total files to be ftped : ${file_count} "
LOCAL_FILE_PATH=/apps/inbound
LOG_FILE=$LOG_DIR/ftpPullFiles_log.${RUNTIME}
cd ${LOCAL_FILE_PATH}
#------------------------------------------------------
# File 1
#------------------------------------------------------
REMOTE_FILE_NAME=$3
$SCRIPTS/ftp_master.ksh -g -s ${REMOTE_FILE_PATH}/${REMOTE_FILE_NAME} -d ${LOCAL_FILE_PATH}/${REMOTE_FILE_NAME} -v {SERVER} >
$LOG_FILE
files_trnsf=`grep -c ^"226 " ${LOG_FILE}`
if [ "$files_trnsf" -eq 1 ]
then
echo "File ${REMOTE_FILE_NAME} FTPed Successfully from ${SERVER}"
#rm ${LOG_FILE}
else
echo "ERROR occured while FTPing file ${REMOTE_FILE_NAME} from ${SERVER}."
echo "See log ${LOG_FILE} for details"
exit 1
fi
if [ "$file_count" -eq 1 ]
then
exit 0
fi
I think the log file generated doesn't have the code 226 or something.... I would appreciate your help... |
| Forum Sponsor | ||
|
|
|
|||
|
what is the exact ouput you are getting? and why dont you post the source code of ftp_master.ksh Or try this
Last edited by ahmedwaseem2000; 02-16-2007 at 09:55 AM. |
|||
| Google UNIX.COM |