A simple call of makeSIGN looks like this:
makesign sig.txt quotes.txt
The following configuration file foo.cfg
does the same as the simple
call above:
# This is a makeSIGN configuration file named foo.cfg INFILE=quotes.txt OUTFILE=sig.txt
To use this configuration file, you have to call makeSIGN this way:
makesign foo.cfg
You can also pass the configuration file to makeSIGN via standard input:
makesign - < foo.cfg
cat foo.cfg | makesign -
DOS users would use "type
" instead of "cat
":
type foo.cfg | makesign -
The cat
or type
command writes the contents of the file
foo.bar
to standard output. This standard output is then piped to
standard input of makeSIGN. To make makeSIGN read the standard input you set
the name of the configuration file to -
.
If you want to write the signature to stantard output, you have to set the
signature file to -
:
makesign - quotes.txt
The configuration file:
#This is a configuration file for makeSIGN named foo_2.cfg OUTFILE=- INFILE=quotes.txt
You can also redirect the standard output to a file. The following example does exactly the same as the simple example from above:
makesign - quotes.txt > sig.txt
Let's have a look at the following example:
makesign --header myheader.txt --separator sig.txt foo.txt foobar.txt
barfoo.txt
This will cause makeSIGN to write a separator, the file myheader.txt
and a random motto from one of the files foo.txt
, foobar.txt
or barfoo.txt
. The signature will be written to the file
sig.txt
.
If you want to use short commandline switches you would write:
makesign -H myheader.txt -SEP sig.txt foo.txt foobar.txt barfoo.txt
Using a configuration file it would be:
# This is a makeSIGN configuration file named foo_3.cfg HEADER=myheader.txt SEPARATOR=TRUE OUTFILE=sig.txt INFILE=foo.txt INFILE=foobar.txt INFILE=barfoo.txt
If you want makeSIGN to behave like the old version 1.30 then you have to use these parameters:
makesign --header personal.txt sig.txt quotes.txt
The is equal to this configuration file:
# This is a makeSIGN configuration file (compatibility to v1.30) named foo_4.cfg OUTFILE=sig.txt INFILE=quotes.txt HEADER=personal.txt
Let's say you have two motto files, one with English mottoes
(english.txt
) and one with German mottoes (german.txt
). You
want to have a footer that fits the language of your motto
(foot-eng.txt
and foot-de.txt
.
Edit the header of the the first motto file:
#This is the header of english.txt FOOTER=foot-eng.txt line 1 of motto 1 line 2 of motto 1 line 1 of motto 2 . . .
And edit the header of the second motto file:
#This is the header of german.txt FOOTER=foot-de.txt line 1 of motto 1 line 2 of motto 1 line 1 of motto 2 . . .
This time you would call makeSIGN like this:
makesign sig.txt english.txt german.txt
You don't have to give the FOOTER option because makeSIGN chooses the footer file from the motto file. The equivalent configuration file:
#This is a configuration file for makeSIGN named foo_5.cfg INFILE=english.txt INFILE=german.txt OUTFILE=sig.txt
This is fun:
makesign - quotes.txt | makesign -h -e - foobar.txt barfoo.txt > sig.txt
So what have we got here... These are two makeSIGNs chained together. The
first makeSIGN will write a random motto from quotes.txt
to standard
output. This is equal to:
#This is the configuration file for the first makeSIGN named foo_6_1.cfg OUTFILE=- INFILE=quotes.txt
The picked motto is then used as a header by the second makeSIGN. It adds a
second motto from one of the files foobar.txt
or barfoo.txt
to the first one and writes everything to standard output. The standard output
is then written to the file sig.txt
.
#This is the configuration file for the second makeSIGN named foo_6_2.cfg HEADER=- OUTFILE=- INFILE=foobar.txt INFILE=barfoo.txt
Unfortunately, there is a problem here: A random number is always based on the current system time. So if you use two makeSIGNs with the same motto file, you are very likely to get the same motto both times. Try it:
makesign - quotes.txt | makesign -h - - quotes.txt