summaryrefslogtreecommitdiff
path: root/sh/ggm
blob: b4321422f924b514514ae85f3454f7951136219a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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/

# `man sort` `info sort`
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"