I have to call two awk scripts where the second one used the output from the first one. Am wondering if it may happen that the second awk might start before the first awk finished creating the file...
if ($nAnomaly == 1) then
awk -v anomaly=$Anom -v zloc="$zmin/$zmax" -v dz=$dz \
-v cols="neat" -v maxdepth=$maxdepth \
-f ../Scripts/create-anomaly-zc.awk $fref.zc > $fmod.zc
else if ($nAnomaly == 2) then
awk -v anomaly="$nAnom/$pAnom" -v zloc="$zmin/$ztran/$zmax" \
-v dz=$dz -v cols="neat" -v maxdepth=$maxdepth \
-f ../Scripts/create-anomaly-zc.awk $fref.zc > $fmod.zc
endif
awk -v xi="$xix/$xiz" -v xf="$xfx/$xfz" \
-f ../Scripts/convert-zc-cmod.awk $fmod.zc > $fmod.cmod