Skip to content

Commit

Permalink
[Enhancement] Rewrite &>> in a portable way (#50516)
Browse files Browse the repository at this point in the history
&>> is a bash4 feature, rewrite it as >> {file} 2>&1 for earlier version bash

Signed-off-by: Kevin Xiaohua Cai <[email protected]>
(cherry picked from commit b79f27e)
  • Loading branch information
kevincai authored and mergify[bot] committed Sep 1, 2024
1 parent 12b599d commit 30e8e8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/start_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ if [ ${RUN_LOG_CONSOLE} -eq 1 ] ; then
export GLOG_logtostderr=1
else
# redirect stdout/stderr to ${LOG_FILE}
exec &>> ${LOG_FILE}
exec >> ${LOG_FILE} 2>&1
fi

echo "start time: $(date), server uptime: $(uptime)"
Expand Down
2 changes: 1 addition & 1 deletion bin/start_fe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ if [ ${RUN_LOG_CONSOLE} -eq 1 ] ; then
echo -e "\nsys_log_to_console = true" >> $STARROCKS_HOME/conf/fe.conf
else
# redirect all subsequent commands' stdout/stderr into $LOG_FILE
exec &>> $LOG_FILE
exec >> $LOG_FILE 2>&1
fi

echo "using java version $JAVA_VERSION"
Expand Down

0 comments on commit 30e8e8c

Please sign in to comment.