[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #BOP-725250]: LDM - write errors to processed data files; tried everything else!



Hi Mike,

re:
> I suspect all is well with everything up to the "store_MADIS.sh" missing
> environmental or path variables.  I'm going to send this little script
> to you and in the meantime I'll check those details.  I THOUGHT I was
> using straightforward shell variables and structures, but with all the
> boats I've been missing lately, who knows?

The contents of store_MADIS is:

#!/bin/sh gunzip > $1/$$.$2; F='echo $2 | cut -c1-13; mv $1/$$.$2 $1/$F

For readability, I would rewrite this to put separate commands on separate
lines.  For example:

#!/bin/sh
gunzip > $1/$$.$2
F='echo $2 | cut -c1-13
mv $1/$$.$2 $1/$F

Comments on this script:

1) the script assumes that 'gunzip', 'cut', and 'mv' can all be found
   by virtue of the PATH in scope when the script is run

2) unless I am missing something, there is an unmatched quote ("'") in
   F='echo $2 | cut -c1-13

3) the script assumes that the directory referred to as $1 exists and
   is writable by the user running the LDM.  If the output directory
   does not exist, you could create it using:

   mkdir -p $1

   This will work if the user running your LDM has write permission in the
   in all subdirectories represented in the directory passed in as '$1'.

> Thanks again.

The most likely problems are either the unmatched quote or the non-existence
of the output directory.

> I'll be checking the files tomorrow re: the 6.5.0 bug and
> patch.

Very good.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: BOP-725250
Department: Support LDM
Priority: Normal
Status: Closed