From 3c5c5b0bbc2e967f14600d1b6ffd4b0947f51835 Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 2 Nov 2022 19:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D&=E7=AC=A6=E5=8F=B7=E8=BD=AC?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/task.sh b/shell/task.sh index 375f529c..0d3c31f1 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -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"