From 95287881c3a248633e0283563bbf92d0d04e8d61 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 23 Aug 2021 09:54:41 +0200 Subject: [PATCH] add munsubscribe script --- local/bin/munsubscribe | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/local/bin/munsubscribe b/local/bin/munsubscribe index 82eeaef..4552687 100755 --- a/local/bin/munsubscribe +++ b/local/bin/munsubscribe @@ -1,9 +1,8 @@ #!/bin/sh - if [ -z "$*" ]; then exec munsubscribe . else - for url in $(mshow -qh list-unsubscribe "$@" | grep -o ']*>' | sed -e 's/^$//'); do - curl -w '%{http_code}' -s -o /dev/null "$url" + for url in $(mshow -qh list-unsubscribe "$@" | xurls -m http); do + curl -L -w '%{http_code}' -s -o /dev/null "$url" done fi