Skip to content
Snippets Groups Projects
Commit 3dc755cd authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

Check for file existence before trying to compare them

parent 7e298c6e
No related branches found
Tags PACK-MNH-V5-3--0-03_RTTOV
No related merge requests found
...@@ -289,11 +289,17 @@ if [ $check -eq 1 ]; then ...@@ -289,11 +289,17 @@ if [ $check -eq 1 ]; then
file1=$path_user/16JAN.1.12B18.001.nc file1=$path_user/16JAN.1.12B18.001.nc
file2=$path_ref/16JAN.1.12B18.001.nc file2=$path_ref/16JAN.1.12B18.001.nc
echo "Compare with ncdump..." echo "Compare with ncdump..."
set +e if [ -f $file1 -a -f $file2 ]; then
diff <(ncdump $file1 | head -c 62889) <(ncdump $file2 | head -c 62889) set +e
t=$? diff <(ncdump $file1 | head -c 62889) <(ncdump $file2 | head -c 62889)
set -e t=$?
allt=$(($allt+$t)) set -e
allt=$(($allt+$t))
else
[ ! -f $file1 ] && echo " $file1 is missing"
[ ! -f $file2 ] && echo " $file2 is missing"
allt=$(($allt+1))
fi
fi fi
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment