Use of ``vi'' for business office word-processing

Jay Batson jay at isis.UUCP
Sat Sep 20 01:01:50 AEST 1986


There has been some discussion about merging a form letter
with a name and address.  We've seen discussions about using
commercial WP packages with databases, and recently, a shell
script to read a data file.

Well, I recommend Towers, 3B2's, and other such boxes to
businesses, and teach them vi/nroff.  And as for merging
stuff, has anybody taken the time to read the 'nroff' paper
out of the 'papers' part of the UNIX manuals?  It describes a
nifty call named
.rd <arg>
which will accomplish the merge.  How you say?  Easy.  Put the
.rd
in your file where you want the name, address, etc. to go.
Then nroff the document.  If you don't provide a redirected
standard input, nroff will prompt you with a bell, or <arg> if
you provided one, and you simply type in the name and address
you want, ending with an extra carriage return (e.g. blank
line).  When it reads the extra <cr>, it proceeds with the
rest of the document.  Of course, you might wish to proceed the
.rd
with a
.na
.nf
and follow with whatever adjusting you want afterward.

Ok, so what about doing this on 100 form letters?  Simple.
Put the names and addresses in a file, seperating each set of
names/addresses with a blank line, and use this line for formatting:
nroff -m(package) form.letter < names.file > output.file
and you're off.  One thing - at the end of the data file, be
sure to put a blank line below the last name, and add a
.ex
on the next line.  That way, nroff will stop looking for more
data, and '.ex(it)'.

Notice that either typing things on the std input, or
providing redirected data will allow you to use as many lines
for any single name/address as you want, and nroff takes the
proper formatting in stride.

So tell me again why we shouldn't recommend vi/nroff?  You
mean _no_ other WP packages use dot commands, and secretaries
aren't smart enough to know a couple of dozen such commands?
Gee, I'm glad I don't have your secretary.

--------

"Stop it!! Stop it now.  This is getting silly again, and this silliness
has _got_ to stop.  Go on to the next sketch.  Go on.  Turn this camera o    "

Jay Batson
       ihnp4!onecom!\
                     isis!jay
seismo!{hao,nbires}!/



More information about the Comp.unix mailing list