<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV><FONT size=4>Sincere apologies as my question is not purely Grads. I have a shell script (code below) which:</FONT></DIV>
<DIV><FONT size=4>1. concatenates files via the cat command;</FONT></DIV>
<DIV><FONT size=4>2. runs grib2ctl to create a ctl</FONT></DIV>
<DIV><FONT size=4>3. run gribmap</FONT></DIV>
<DIV><FONT size=4>When I run the script manually (i.e. on the command line) it performs as required.</FONT></DIV>
<DIV><FONT size=4>When I run it through crontab, it concatenates files ok, but it creates a ctl file which is empty and it does not create an idx file (even though I have indicated the paths to where grib2ctl and gribmap are located)</FONT></DIV>
<DIV><FONT size=4>Assistance will be appreciated.</FONT></DIV>
<DIV><FONT size=4>Zilore.</FONT></DIV>
<DIV> <BR><FONT face="arial, helvetica, sans-serif" size=4>#<BR>#!/bin/bash<BR>#This script processes UKMO model data from RETIM-SYNERGIE and archives it on <BR>#the ACMAD system. The cycles (or times) are 00 and 12.<BR>#<BR>ctl_ext=".ctl"<BR>grib_ext=".grib"<BR>UK_sufx="2"<BR>dash="-"<BR>model="ukmo"<BR>#<BR>model_dat=`date "+%Y%m%d"`<BR>model_hr=`date "+%H"`<BR>#<BR>model_dat1=$( date -d "1 day" "+%Y%m%d" )<BR>#<BR>model_mon=`date "+%m"`<BR>mon_name=`date "+%B"`<BR>yr=`date "+%y"`<BR>#<BR>if [ $model_hr -gt "15" ]<BR> then<BR> cycle="12"<BR>else<BR> cycle="00"<BR>fi<BR>#<BR>base_dir="/home/Mumba/archive/$model_mon$dash$mon_name$yr"<BR>#<BR> cd $base_dir/$model/$model_dat<BR># pwd<BR> cat *H > $model$cycle$grib_ext<BR> <FONT color=#0000ff>/usr/local/bin/grib2ctl.pl -verf
$model$cycle$grib_ext > $model$cycle$ctl_ext<BR> /usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v -e<BR></FONT> rm *H<BR> #<BR> mv $base_dir/$model/$model_dat1/*H $base_dir/$model/$model_dat<BR> cat *H > $model$cycle$UK_suf$grib_ext<BR> <FONT color=#0000ff>/usr/local/bin/grib2ctl.pl -verf $model$cycle$UK_sufx$grib_ext > $model$cycle$UK_sufx$ctl_ext<BR> /usr/local/grads/bin/gribmap -i $model$cycle$UK_sufx$ctl_ext -v -e<BR></FONT> rm *H<BR> #<BR>#<BR>date<BR>exit 0<BR></DIV></FONT></td></tr></table><br>