.TH mkline "" "" "Command"
.PC "Fold an alias file, paths file, or mailing list into one-line records"
\fB/usr/lib/mail/mkline [\-ltn] [\fIfile ... \fB]\fR
.PP
.HS
.SH Options:
.IC \fB\-l\fR 0.3i
Generate a list of addresses
.IC \fB\-n\fR
Do not extract keys from the input
.IC \fB\-t\fR
Separate the key from the data with a single tab character
.HE
Command
.B mkline
takes alias file, path file, or mailing-list file
as input, and generates output records that contain one complete
entry per line, and removes all comments and white space.
.PP
.B mkline
recognizes the following command-line options:
.IP \fB\-l\fR 0.3i
Generate a list of addresses.
Use this to generate a mailing list.
If you use this option,
.B mkline
ignores options
.B \-n
and
.BR \-t .
.IP \fB\-n\fR
Do not extract keys from the input.
.B mkline
passes all token through unchanged, although it still removes all
comments and as much white space as it can without creating ambiguous output.
.IP \fB\-t\fR
Separate the key from the data with a single tab character.
The default is to use a colon `:'.
.PP
If its command line does not name an input
.IR file ,
.B mkdbm
reads the standard input.
.B mkline
also reads the standard input if a
.I file
is named `-'; in this way, it can mix data read from the standard input with
material read from files.
.SH Examples
Consider the following alias file:
.DM
.ta 0.5i 4.5i
	Postmaster:hustead	# Ted Hustead, jr.
	UUCP-Postmasters: tron, chongo	# namei contacts
	yamato	# kremvax contact
	tron: tron@namei.uucp (Ronald S. Karr)
	yamato: yamato@kremvax.ussr.comm (Yamato T. Yankelovich)
	chongo: chongo@eek.uts.amdahl.com (Landon Curt Noll)
.DE
.PP
When it reads this file,
.B mkline
generates:
.DM
	Postmaster:hustead
	UUCP-Postmasters:tron,chongo yamato
	tron:tron@namei.uucp
	yamato:yamato@kremvax.ussr.comm
	chongo:chongo@eek.uts.amdahl.com
.DE
.PP
As an example of using
.B mkline
to compress mailing lists, consider the mailing list:
.DM
.ta 0.5i 4.5i
	tron@namei.uucp,tron@uts.amdahl.com	# Ronald S. Karr
	yamato@kremvax.ussr.comm	# Yamato T. Yankelovich
	chongo@eek.uts.amdahl.com	# Landon Curt Noll
	Wilt . (the Stilt) Chamberlain@NBA.US	# RFC822 doc example
.DE
.PP
The command
.B "mkline -l"
generates the following:
.DM
.ta 0.5i
	tron@namei.uucp
	tron@uts.amdahl.com
	yamato@kremvax.ussr.comm
	chongo@eek.uts.amdahl.com
	Wilt.Chamberlain@NBA.US
.DE
.SH "See Also"
.Xr "commands," commands
.Xr "mail [overview]," mail.o
.Xr "mkdbm," mkdbm
.Xr "mksort," mksort
.Xr "pathalias," pathalias
.Xr "smail" smail
.SH Notes
.B mkline
leaves one space character if the concatenation
of two tokens would otherwise cause ambiguity.
.PP
.B mkline
frequently is used with the command
.BR mksort .
For an example of using these commands together, see the Lexicon entry for
.BR mksort .
.PP
Copyright \(co 1987, 1988 Ronald S. Karr and Landon Curt Noll.
Copyright \(co 1992 Ronald S. Karr.
.PP
.B mkdbm
is part of the
.B smail
package.
For a full copyright statement, see file
.BR COPYING ,
which is included with source code to
.BR smail ,
or type \fBsmail \-bc\fR
to see the distribution rights and restrictions associated with this software.
