On Mon, 20 May 2013, Paul Heinlein wrote: > The tool I'd normally reach for in this situation is m4. If, for instance, > you were able to loop through a list of subscribers and assign > $NAME and $ADDRESS, then > > m4 -D GREETING="$NAME" newsletter.m4 | mail -s "Subject" $ADDRESS > > The newletter.m4 would contain the GREETING token which would get replaced > with $NAME.
Paul, I've read the m4 man page, info file, and manual (the .pdf version of the info file) without seeing how I would set up the input files. I assume that one file contains two tokens, NAME and ADDRESS, but how are they separated on each line? The other file, newsletter.m4, I assume begins with: GREETING, This is the text of the newsletter. Is this correct? Trying to find examples by searching the Web turned up lots of Microsoft examples but none using GNUm4. Thanks, Rich -- Richard B. Shepard, Ph.D. | Have knowledge, will travel. Applied Ecosystem Services, Inc. | <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
