Skip to content

Commit

Permalink
use tee (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
retokromer authored and dericed committed Aug 7, 2018
1 parent 89022b1 commit 975c573
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions writelto
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ WRITELTODIR="${LTO_LOGS}/writelto"
_mkdir2 "${WRITELTODIR}"

if [ -n "$RSYNC_ERR_2" ] ; then
echo "rsync exited with ${RSYNC_ERR_1} on the first pass and ${RSYNC_ERR_2} on the second pass."
echo "rsync exited with ${RSYNC_ERR_1} on the first pass and ${RSYNC_ERR_2} on the second pass." >> "${WRITELTODIR}/${TAPE_SERIAL}_writelto.txt"
echo "rsync exited with ${RSYNC_ERR_1} on the first pass and ${RSYNC_ERR_2} on the second pass." | tee -a "${WRITELTODIR}/${TAPE_SERIAL}_writelto.txt" 2>&1
else
echo "rsync exited with ${RSYNC_ERR_1}."
echo "rsync exited with ${RSYNC_ERR_1}." >> "${WRITELTODIR}/${TAPE_SERIAL}_writelto.txt"
echo "rsync exited with ${RSYNC_ERR_1}." | tee -a "${WRITELTODIR}/${TAPE_SERIAL}_writelto.txt" 2>&1
fi

if [[ "${PREMIS_DB}" = "Y" ]] ; then
Expand Down

0 comments on commit 975c573

Please sign in to comment.