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]>
  • Loading branch information
kevincai authored Sep 1, 2024
1 parent 4515b29 commit b79f27e
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 @@ -219,7 +219,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 @@ -225,7 +225,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 b79f27e

Please sign in to comment.