Commit quinq sed changes. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 997ca999107c145cde16263504e5fa539714abb3 DIR parent cfca604f39b7db50d890aaa36f1a933d632f99f4 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Sat, 28 Dec 2019 22:09:52 +0100 Commit quinq sed changes. Diffstat: M annna-start-services | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- DIR diff --git a/annna-start-services b/annna-start-services @@ -89,8 +89,7 @@ then [ "$user" = "${botname}" ] && continue uri="$(printf "%s\n" "${text}" \ - | grep 'https\{0,1\}://[^ ]\{1,\}' \ - | sed "s_.*\(https\{0,1\}://[^]:?#[@!$&'()*+,;= ]\{1,\}\).*_\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@^ *@@' | cut -c -200)" + urititle="$(grabtitle < "${tmpf}" | sed 's/^ *\(.\{0,200\}\).*/\1/')" if [ -n "$urititle" ]; then case "${urititle}" in