This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Angel Li <address@hidden> >Organization: RSMAS/University of Miami >Keywords: 200006061956.e56JuLT23087 McIDAS-X ADDE cron mcbatch.sh mcrun.sh Angel, >Thanks for all that information, it has gotten me well underway. Glad to have helped. >Question: in a script, is there a way to tell if an IMGCOPY command >failed? Yes. Pretty much all McIDAS commands return exit statuses that can be checked. Here is a snippit from a Korn shell script doing an IMGCOPY that does just that: #SST - GOES-East Imager Regression SST SRCDATASET=CIMSSP/GERSST DESTDATASET=CIMSSLOCAL/CC KEYWORDS="SIZE=ALL" PROD=CC ANUM=12 IBAND=1 OBAND=31 MEMO='CIMSS Prod.: Sea Sfc. Temp.' export SRCDATASET DESTDATASET KEYWORDS PROD ANUM IBAND OBAND MEMO imgcopy.k $SRCDATASET $DESTDATASET $KEYWORDS ret=$? if [[ $ret -eq 0 ]]; then imgcha.k $DESTDATASET.1 BAND=$OBAND MEMO="$MEMO" ret=$? else echo ERROR: IMGCOPY of $SRCDATASET $DESTDATASET $KEYWORDS FAILED exit 1 fi >Do I have to parse the output of McIDAS session to find out? Not any more. >Thanks, Later... Tom