From a0bedbc207750cae0fadff7c6072358e764ecbe1 Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Thu, 14 Mar 2019 21:07:27 +0100 Subject: [PATCH] line breaks in startproc scripts --- bashbot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bashbot.sh b/bashbot.sh index 88c74a4..af06291 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -65,6 +65,7 @@ send_message() { local text="$(echo "$2" | sed 's/ mykeyboardstartshere.*//g;s/ myfilelocationstartshere.*//g;s/ mylatstartshere.*//g;s/ mylongstartshere.*//g;s/ mytitlestartshere.*//g;s/ myaddressstartshere.*//g;s/ mykeyboardendshere.*//g')" local arg="$3" [ "$3" != "safe" ] && { + text="$(echo "$text" | sed 's/ mynewlinestartshere /\r\n/g')" # hack for linebreaks in startproc scripts local no_keyboard="$(echo $2 | sed '/mykeyboardendshere/!d;s/.*mykeyboardendshere.*/mykeyboardendshere/')" local keyboard="$(echo "$2" | sed '/mykeyboardstartshere /!d;s/.*mykeyboardstartshere //g;s/ myfilelocationstartshere.*//g;s/ mylatstartshere.*//g;s/ mylongstartshere.*//g;s/ mytitlestartshere.*//g;s/ myaddressstartshere.*//g;s/ mykeyboardendshere.*//g')"