mblaze/contrib/mhasatt

10 lines
287 B
Plaintext
Raw Normal View History

2016-07-22 23:29:19 +00:00
#!/bin/sh
# mhasatt [RANGE...] - print mails with real attachments
mshow -t "${@:-:}" | awk '
/^[^ 0-9]/ && /\// { file = $0 }
/^.*[0-9]*: (application\/pkcs7-signature)/ { next }
/^.*[0-9]*: (application|image|video)\// || /^.*[0-9]*:.*name=/
{ if (file) print file; file = 0 }
'