1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- lifted from man+troff by doclifter -->
3 <refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='randstrman'>
5 <!-- Randstr: grab a random text string from a specified text file
6 Amy A. Lewis, October, 1995 -->
9 <refentrytitle>RANDSTR</refentrytitle>
10 <manvolnum>1</manvolnum>
11 <refmiscinfo class='source'>October 1995</refmiscinfo>
12 <refmiscinfo class='manual'>Linux hackery</refmiscinfo>
15 <refname>randstr</refname>
16 <refpurpose>fetch a random text string from a specified file</refpurpose>
18 <!-- body begins here -->
20 <refsect1 xml:id='synopis'><title>SYNOPIS</title>
21 <para><emphasis role='strong' remap='B'>randstr </emphasis><emphasis remap='I'>filename</emphasis></para>
24 <refsect1 xml:id='description'><title>DESCRIPTION</title>
26 <emphasis role='strong' remap='B'>randstr</emphasis>
27 is a stripped-down, minimalist version of the popular
28 <citerefentry><refentrytitle>fortune</refentrytitle><manvolnum>6</manvolnum></citerefentry>
31 <para>It reads files with the same structure as the fortunes databases, and
32 displays a random string.</para>
34 <refsect2 xml:id='usage'><title>Usage</title>
35 <para><emphasis role='strong' remap='B'>randstr</emphasis>
36 might be used, with a database of signatures created with a text editor
38 <citerefentry><refentrytitle>strfile</refentrytitle><manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>unstr</refentrytitle><manvolnum>8</manvolnum></citerefentry>
39 utilities, to randomly change the
40 <emphasis remap='I'>$HOME/.signature</emphasis>
41 file. To do so, create the necessary database as, for example,
42 <emphasis remap='I'>signatures</emphasis> and <emphasis remap='I'>signatures.dat</emphasis>
43 in the home directory, and add the following line to
44 <markup>.profile</markup> or <markup>.login</markup>:</para>
45 <blockquote remap='RS'>
46 <para><emphasis role='strong' remap='B'>randstr </emphasis><emphasis remap='I'>signatures</emphasis>
47 ><markup>.signature</markup>
48 </para></blockquote> <!-- remap='RE' -->
50 <para>As superuser, a similar sort of thing could be placed in the
51 <citerefentry><refentrytitle>Pnews</refentrytitle><manvolnum>1</manvolnum></citerefentry> or <citerefentry><refentrytitle>Rnmail</refentrytitle><manvolnum>1</manvolnum></citerefentry>
52 scripts, although it should certainly test to be certain that the files
53 exist, and creating the files of signatures might require a good deal of
54 help for a lot of users.</para>
56 <para>Also as superuser, one might use
57 <emphasis role='strong' remap='B'>randstr</emphasis>
59 <emphasis role='strong' remap='B'>Perl</emphasis>
61 <emphasis remap='I'>etc/passwd</emphasis>
63 <emphasis remap='I'>strfile</emphasis>
64 type database, and use this database to run a monthly lottery.</para>
68 <refsect1 xml:id='bugs'><title>BUGS</title>
69 <para>None known.</para>
72 <refsect1 xml:id='see_also'><title>SEE ALSO</title>
73 <para><citerefentry><refentrytitle>fortune</refentrytitle><manvolnum>6</manvolnum></citerefentry>, <citerefentry><refentrytitle>strfile</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>