Rework some sed expressions - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 7868e8a7918b2e8f03072014b7290603594f9e5c | |
parent ca0f2ce4009a8f8f2a6999fa6581df78c7e01cbb | |
Author: Quentin Rameau <[email protected]> | |
Date: Sat, 9 Nov 2019 21:36:06 +0100 | |
Rework some sed expressions | |
Diffstat: | |
M annna-start-services | 5 ++--- | |
1 file changed, 2 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -89,8 +89,7 @@ then | |
[ "$user" = "${botname}" ] && continue | |
uri="$(printf "%s\n" "${text}" \ | |
- | sed 's,.*\(https\{0\,1\}://[^ ]\{1\,\}\).*,\1,' \ | |
- | grep 'https\{0,1\}://[^ ]')" | |
+ | sed -n '/.*\(https\{0,1\}:\/\/[^ ]\{1,\}\).*/s//\1/p… | |
case "${text}" in | |
*\#nospoil*) | |
;; | |
@@ -99,7 +98,7 @@ then | |
then | |
tmpf=$(mktemp) | |
fetch-url "${uri}" > "${tmpf}" | |
- urititle="$(grabtitle < "${tmpf}" | sed 's@^ *… | |
+ urititle="$(grabtitle < "${tmpf}" | sed 's/^ *… | |
if [ -n "$urititle" ]; | |
then | |
case "${urititle}" in |