4

Unexpected results when triggered from cron

view full story
linux-howto

http://www.unix.com – Following script gives different results when triggered from Cron compared to when triggered from command line. It is not able to assign values to some variables when triggered from cron. Can any one help? Its a very simple script Script - Code: #! /bin/ksh sFile=$1 sEnv=$2 sWaitFile=$3 # SETTING THE FILE NAME file=`echo $1 | cut -c1-6` echo "The File to poll - ${sFile}" echo "Environment - ${sEnv}" echo "Wait File - ${sWaitFile}" echo ${file} #Files LOG_DATE=`date +"%m%d%y.%H%M"` sParmFile=${PARM_DIR}/${sWaitFile} LOG_FILE=${LOG_DIR}/poll.${f (HowTos)