configuration/local/bin/munsubscribe

10 lines
220 B
Bash
Executable File

#!/bin/sh
if [ -z "$*" ]; then
exec munsubscribe .
else
for url in $(mshow -qh list-unsubscribe "$@" | grep -o '<http[^>]*>' | sed -e 's/^<//' -e 's/>$//'); do
curl -w '%{http_code}' -s -o /dev/null "$url"
done
fi