修复&符号转义

This commit is contained in:
whyour 2022-11-02 19:25:03 +08:00
parent 802b2d722e
commit 3c5c5b0bbc

View File

@ -58,7 +58,7 @@ format_params() {
if type timeout &>/dev/null; then
timeoutCmd="timeout -k 10s $command_timeout_time "
fi
params=$(echo "$@" | sed 's/&/\\&/g')
params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
}
show_log="false"