I have been struggling with this problem for a while. I have a script and within it, I have the following sed command:
DEF_CTLFILE1=$FDF_TOP/programs/sw_ctrl.ctl
sed "s/process_group_to_be_replaced_here/$PROCESS_GROUP/g" \
${DEF_CTLFILE1} > ${fname1}.ctl
When I allow a cron job to execute the script, the output (fname1.ctl) will be produced but have a size of 0.
Please note that I made sure that the two files contain aboslute paths within the variable definition (fname1).
When I manually execute the script, it works just fine. I suppose I need more understand on cron jobs and permissions and visibility but I am just starting out. Any and all tips would be much appreciated.
My version of Linux is Linux 2.6.18-348.6.1.0.1.el5 x86_64, Red Hat Linux 5.9 This is a ksh script.