<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.&nbsp;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&nbsp;ok, but it creates a ctl file which is empty and it does not&nbsp;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>&nbsp;<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>&nbsp; then<BR>&nbsp;&nbsp;&nbsp; cycle="12"<BR>else<BR>&nbsp;&nbsp;&nbsp; cycle="00"<BR>fi<BR>#<BR>base_dir="/home/Mumba/archive/$model_mon$dash$mon_name$yr"<BR>#<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd $base_dir/$model/$model_dat<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwd<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cat *H &gt; $model$cycle$grib_ext<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>/usr/local/bin/grib2ctl.pl -verf
 $model$cycle$grib_ext &gt; $model$cycle$ctl_ext<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v -e<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm *H<BR>&nbsp; #<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv $base_dir/$model/$model_dat1/*H $base_dir/$model/$model_dat<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cat *H &gt; $model$cycle$UK_suf$grib_ext<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>/usr/local/bin/grib2ctl.pl -verf $model$cycle$UK_sufx$grib_ext &gt; $model$cycle$UK_sufx$ctl_ext<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/local/grads/bin/gribmap -i&nbsp; $model$cycle$UK_sufx$ctl_ext -v -e<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm *H<BR>&nbsp;&nbsp; #<BR>#<BR>date<BR>exit 0<BR></DIV></FONT></td></tr></table><br>