summaryrefslogtreecommitdiff
path: root/sh/ggm
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-04-01 03:51:18 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-04-01 03:51:18 -0700
commitabe0f2a59a4dfb64003d759d406ee5a21cf142bd (patch)
treef9a18a4367223aed9e3ee97bc2f1cc8cf2f92c76 /sh/ggm
parentacc9d82db44135df1c7fe642241fe0bf39cd5efe (diff)
curl and grep GNU Mailman mailing list archive scripts
cgm steal AGPL-3.0-only licensed code from https://code.librehq.com/ots/ots-tools/-/blob/main/search-mailman-archive
Diffstat (limited to 'sh/ggm')
-rwxr-xr-xsh/ggm13
1 files changed, 13 insertions, 0 deletions
diff --git a/sh/ggm b/sh/ggm
new file mode 100755
index 0000000..7bb66a4
--- /dev/null
+++ b/sh/ggm
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Grep Gnu Mailman Mailing list archive
+# use with cgm
+
+# testing mailing list archives:
+# https://lists.zx2c4.com/pipermail/cgit/
+# https://mailman.nginx.org/pipermail/nginx/
+# only year:
+# https://dianne.skoll.ca/pipermail/remind-fans/
+
+ls --zero | sort -zt- -k1,1n -k2,2.3M | xargs -0 grep -i --color=always "$@"
+# if want reverse sort, put r right after -k1,1n, more see `man sort`, e.g.:
+#ls --zero | sort -zt- -k1,1nr -k2,2.3Mr | xargs -0 grep -i --color=always "$@" | "$PAGER"