leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
451 stars 50 forks source link

New script: mmatt #143

Closed Anachron closed 6 years ago

Anachron commented 6 years ago

Sometimes I send a ton of attachments per mail, mostly for holiday pictures or important documents. I do this by preparing a file with a list of all attachments that I want to send and then run this little self-written script that just passes them to mcom (named it mmatt for [m]blaze [m]ultiple [att]achments).

#!/usr/bin/env sh

test -f "${1}" || exit 1
at=$(awk '{print "-attach "$1}' "${1}" | tr '\n' ' ')
mcom ${at}

If too simple/useless feel free to close :)

leahneukirchen commented 6 years ago

I think mcom -attach $(cat list-of-files) will work just as well?

Anachron commented 6 years ago

Yep, that's totally right, not sure why I didn't think of this.

Thanks,- closing this!