patternize(1)                                                    patternize(1)

       patternize - generate random strings matching a pattern

       patternize [OPTIONS] PATH

       patternize  reads  configuration from PATH and writes a randomly chosen
       string matching one of the patterns found there to standard output.

       -n, --number COUNT
              The number of strings to generate.  The default is 1.

       -h, --help
              Display a usage message.

       -V, --version
              Display a version string.

       Configuration may either be a single file or it may be a directory.  In
       the  latter  case,  the  files in the directory are read lexical order.
       Backup files (containing ~) and dotfiles are skipped.

       Configuration consists of a collection of sections.   Sections  have  a
       type and possibly a name:

              [TYPE NAME]

       Types  and  names are both nonempty sequences of ASCII letters and dig‐
       its.  A section ends either when a new section is introduced or at  the
       end of a file.

       A  patterns  section contains a list of pattern strings, one to a line.
       In a pattern string every character stands for  itself  except  for  $,
       which  either  introduces  a substitution of the form ${CATEGORY} or is
       doubled as $$ to represent a single $ symbol.

       Patterns sections do not have names.  All patterns  sections  are  con‐
       catenated together.

       A  category section always has a name, which can be used in the substi‐
       tutions referred to above.  The section contains  a  list  of  possible
       substitution strings for this category, one to a line.

       All the category sections with a given name are concatenated together.

       A config section defines other configuration settings.  Each line has a
       single configuration setting:


       Supported configuration settings are:

              Defines how generated strings are picked.  The  possible  values

                     Picks  uniformly  from  all  possible  generated strings.
                     This is the default.

                     Picks uniformly among patterns and then  uniformly  among
                     the strings generated by that pattern.

              The  uniform  distribution  is  a  bit  slower to calculate than
              twolevel and will inflate the incidence of patterns which gener‐
              ate many strings (for instance, because they have more substitu‐
              tions) in a way that can be displeasing.

       All input files are assumed to follow the current  multibyte  character