Skip to content

cutthroat/perlfortune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

NAME

perlfortune - Very basic fortune cookies, hacked in Perl

SYNOPSIS

perlfortune [-help|-man|-build] <file ...>

OPTIONS

-help

Print brief help message

-man

Show the manual page

-build

Build index files

DESCRIPTION

This is a command-line tool that implements functionality similar to the fortune(6) program. Snap it in an environment where you cannot have true fortune but you have at least version 5.10 of perl.

The text file format for the cookies is the same. However perlfortune uses its own index format. You can build the index files by passing the -build option. Then for each input file a corresponding .idx file is created.

When printing a fortune cookie first a file is chosen at randomly from the supplied list of input files. Only then a cookie is selected from that particular file. An alternative taking into account the number of cookies in each file may be implemented some time in the future. Handling of directories would be nice too.

More advanced features of the BSD fortune are not implemented.

AUTHOR

Dimitar Dimitrov

SEE ALSO

fortune(6), fortune-mod

About

Very basic fortune cookies, hacked in Perl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages