From abe0f2a59a4dfb64003d759d406ee5a21cf142bd Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 1 Apr 2024 03:51:18 -0700 Subject: 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 --- sh/ggm | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 sh/ggm (limited to 'sh/ggm') 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" -- cgit v1.2.3-70-g09d2