-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
Description
It would be helpful to include this handy recipe for producing a list of machine-readable output files. It came up in the discussion of #107 .
$ mailmerge --sample
$ mailmerge --no-limit --output-format raw | \
grep -v '>>>' | \
csplit \
--elide-empty-files \
--silent \
--prefix 'message-' \
--suffix-format '%03d.eml' \
- \
'/^TO:/' '{*}'
$ ls message-*
message-000.eml message-001.eml
$ cat message-000.eml
TO: [email protected]
SUBJECT: Testing mailmerge
FROM: My Self <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 11 Nov 2020 17:35:20 -0000
Hi, Myself,
Your number is 17.
$ cat message-001.eml
TO: [email protected]
SUBJECT: Testing mailmerge
FROM: My Self <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 11 Nov 2020 17:35:20 -0000
Hi, Bob,
Your number is 42.