From 3226c448057648fd33a2a6668b16b611021b50ef Mon Sep 17 00:00:00 2001 From: "wang.kangning" Date: Tue, 10 Oct 2023 10:43:52 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=20emit-log=20?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emit-log.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emit-log.sh b/emit-log.sh index e660c1b7..878710a0 100755 --- a/emit-log.sh +++ b/emit-log.sh @@ -3,6 +3,9 @@ # 取出 log.txt 的文件内容 log=$(cat log.txt|grep 'New tag:') +# 将换行符替换为两个换行符 +log=$(echo "$log"|sed 's/\n/\\n\\n/g') + # 如果 log.txt 为空 if [ -z "$log" ]; then curl "https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}" \