eccodes/examples/python/grib_index.sh

23 lines
417 B
Bash
Raw Permalink Normal View History

2013-03-25 12:04:10 +00:00
#!/bin/sh
. ./include.sh
2017-01-23 11:14:40 +00:00
TEMP1=temp1.grib_index.py.txt
TEMP2=temp2.grib_index.py.txt
IDX_FILE=my.idx
rm -f $IDX_FILE
# First time it will create the index file
$PYTHON $examples_src/grib_index.py > $TEMP1
[ -f "$IDX_FILE" ]
# Second time it will use the file created before
$PYTHON $examples_src/grib_index.py > $TEMP2
# Check output in both cases is the same
diff $TEMP1 $TEMP2
rm -f $IDX_FILE $TEMP1 $TEMP2