Data

Find first examples in the fortune databases directory. In order to use the fortune databases, create a random access file for storing strings with strfile.

for db in databases/*;do strfile $db;done  

Example Output

"databases/i-am-developer.dat" created
There was 1 string
Longest string: 91 bytes
Shortest string: 91 bytes
"databases/i-am-developer.dat.dat" created
There was 1 string
Longest string: 32 bytes
Shortest string: 32 bytes
"databases/programming-wisdom.dat" created
There were 2 strings
Longest string: 123 bytes
Shortest string: 114 bytes
"databases/programming-wisdom.dat.dat" created
There was 1 string
Longest string: 36 bytes
Shortest string: 36 bytes

Format

  • Each entry starts with %
  • Each entry must end with a newline.

Usage

To use fortune with the databases, we pass the directory.

fortune databases
We build our computers the way we build our cities:
   over time, without a plan, on top of ruins.
        -- Ellen Ullman

Use it with cowsay

fortune databases | cowsay
 _________________________________________
/ We build our computers the way we build \
| our cities:                             |
|                                         |
| over time, without a plan, on top of    |
| ruins.                                  |
|                                         |
\ -- Ellen Ullman                         /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||