COHERENT manpages

This page displays the COHERENT manpage for mkline [Fold an alias file, paths file, or mailing list into one-line records].

List of available manpages
Index


mkline -- Command

Fold an alias file, paths file, or mailing list into one-line records
/usr/lib/mail/mkline [-ltn] [file ... ]

Command 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.

mkline recognizes the following command-line options:

-l Generate a list of addresses.  Use  this to generate a mailing list.  If
   you use this option, mkline ignores options -n and -t.

-n Do not  extract keys  from the input.   mkline passes all  token through
   unchanged,  although it  still removes  all comments  and as  much white
   space as it can without creating ambiguous output.

-t Separate the key from the data with a single tab character.  The default
   is to use a colon `:'.

If its command  line does not name an input  file, mkdbm reads the standard
input.  mkline  also reads the  standard input if  a file is  named `-'; in
this way, it  can mix data read from the  standard input with material read
from files.

Examples

Consider the following alias file:

     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)

When it reads this file, mkline generates:

    Postmaster:hustead
    UUCP-Postmasters:tron,chongo yamato
    tron:tron@namei.uucp
    yamato:yamato@kremvax.ussr.comm
    chongo:chongo@eek.uts.amdahl.com

As  an example  of using  mkline  to compress  mailing lists,  consider the
mailing list:

     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

The command mkline -l generates the following:

     tron@namei.uucp
     tron@uts.amdahl.com
     yamato@kremvax.ussr.comm
     chongo@eek.uts.amdahl.com
     Wilt.Chamberlain@NBA.US

See Also

commands,
mail [overview],
mkdbm,
mksort,
pathalias,
smail

Notes

mkline leaves one space character  if the concatenation of two tokens would
otherwise cause ambiguity.

mkline frequently is used with the  command mksort. For an example of using
these commands together, see the Lexicon entry for mksort.

Copyright © 1987, 1988 Ronald S. Karr and Landon Curt Noll.  Copyright
© 1992 Ronald S. Karr.

mkdbm is  part of the smail  package.  For a full  copyright statement, see
file COPYING,  which is included with  source code to smail,  or type smail
-bc to  see the distribution  rights and restrictions  associated with this
software.