Skip to content

Commit

Permalink
Add double quotes around variables
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jun 4, 2024
1 parent 709e6dc commit 0acaa37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ source "${USHgfs}/preamble.sh"
if [ "$DOSPC_WAV" = 'YES' ]
then
export dtspec=3600.
sed "s/^\(.*\)$/${USHgfs//\//\\\/}\/wave_outp_spec.sh \1 ${ymdh} spec ${SPECDATA//\//\\\/} > ${SPECDATA//\//\\\/}\/spec_\1.out 2>&1/" buoy_lst.txt >> tmpcmdfile.${FH3}
sed "s/^\(.*\)$/${USHgfs//\//\\\/}\/wave_outp_spec.sh \1 ${ymdh} spec ${SPECDATA//\//\\\/} > ${SPECDATA//\//\\\/}\/spec_\1.out 2>&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}"
fi

if [ "$DOBLL_WAV" = 'YES' ]
then
export dtspec=3600.
sed "s/^\(.*\)$/${USHgfs//\//\\\/}\/wave_outp_spec.sh \1 ${ymdh} bull ${SPECDATA//\//\\\/} > ${SPECDATA//\//\\\/}\/bull_\1.out 2>&1/" buoy_lst.txt >> tmpcmdfile.${FH3}
sed "s/^\(.*\)$/${USHgfs//\//\\\/}\/wave_outp_spec.sh \1 ${ymdh} bull ${SPECDATA//\//\\\/} > ${SPECDATA//\//\\\/}\/bull_\1.out 2>&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}"
fi

split -n l/1/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.01
Expand Down Expand Up @@ -554,9 +554,9 @@ source "${USHgfs}/preamble.sh"
if [ "$wavenproc" -gt '1' ]
then
if [ ${CFP_MP:-"NO"} = "YES" ]; then
${wavempexec} -n ${wavenproc} ${wave_mpmd} cmdmprogbuoy
${wavempexec} -n "${wavenproc}" "${wave_mpmd}" cmdmprogbuoy
else
${wavempexec} ${wavenproc} ${wave_mpmd} cmdfile.buoy
${wavempexec} "${wavenproc}" "${wave_mpmd}" cmdfile.buoy
fi
exit=$?
else
Expand Down
18 changes: 9 additions & 9 deletions ush/wave_outp_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,27 +191,27 @@ source "${USHgfs}/preamble.sh"
then
if [ "$specdir" = "bull" ]
then
sed '9,$d' "${outfile}" >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.bull
sed '8,$d' "${coutfile}" >> ${STA_DIR}/c${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.cbull
sed '9,$d' "${outfile}" >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.bull"
sed '8,$d' "${coutfile}" >> "${STA_DIR}/c${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.cbull"
else
cat $outfile >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.spec
cat $outfile >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.spec"
fi
elif [ "${ymdh}" = "${YMDHE}" ]
then
if [ "$specdir" = "bull" ]
then
sed '1,7d' "${outfile}" >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.bull
sed '1,6d' "${coutfile}" >> ${STA_DIR}/c${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.cbull
sed '1,7d' "${outfile}" >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.bull"
sed '1,6d' "${coutfile}" >> "${STA_DIR}/c${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.cbull"
else
sed -n "/^${YMD} ${HMS}$/,\$p" "${outfile}" >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.spec
sed -n "/^${YMD} ${HMS}$/,\$p" "${outfile}" >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.spec"
fi
else
if [ "$specdir" = "bull" ]
then
sed '8q;d' "${outfile}" >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.bull
sed '7q;d' "${coutfile}" >> ${STA_DIR}/c${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.cbull
sed '8q;d' "${outfile}" >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.bull"
sed '7q;d' "${coutfile}" >> "${STA_DIR}/c${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.cbull"
else
sed -n "/^${YMD} ${HMS}$/,\$p" "${outfile}" >> ${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.spec
sed -n "/^${YMD} ${HMS}$/,\$p" "${outfile}" >> "${STA_DIR}/${specdir}fhr/${WAV_MOD_TAG}.${ymdh}.${buoy}.spec"
fi
fi
else
Expand Down

0 comments on commit 0acaa37

Please sign in to comment.