add a few example scripts

This commit is contained in:
Christian Neukirchen 2016-07-20 18:48:12 +02:00
parent 4eff264615
commit 10e6a78286
2 changed files with 18 additions and 0 deletions

14
contrib/mfillmid Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
# mfillmid - fill in files for message-ids (via mairix)
exec awk '
function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" }
/<..*>/ {
match($0, "<..*>")
mid = substr($0, RSTART+1, RLENGTH-2)
if ("mairix -r m:" q(mid) | getline file) {
print substr($0, 0, RSTART-1) file
next
}
}
{ print }'

4
contrib/mmairix Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# mmairix QUERY - santoku wrapper around mairix
mairix -r "$@" | mless