Skip to content

Title: fortune: no place to put residual probability when using more than two databases #142

@linux36524

Description

@linux36524

Body:

I’m running into an issue with fortune when trying to use multiple personal databases with percentage-based selection.

For example, this works fine:

fortune \
    55% $HOME/.config/fortune/001 \
    45% $HOME/.config/fortune/002

Any combination of two databases displays fortunes correctly.

However, when I try to use more databases like this:

fortune \
    55% $HOME/.config/fortune/001 \
    45% $HOME/.config/fortune/002 \
    10% $HOME/.config/fortune/003 \
    10% $HOME/.config/fortune/004 \
    5% $HOME/.config/fortune/005

I get the error:

fortune: no place to put residual probability (60%)

All the directories contain .dat files generated with strfile. Each directory has at least one fortune. Using only any two databases works fine.

I’m not sure why adding more databases causes this residual probability error. Has anyone encountered this before, or is there a proper way to configure multiple databases with percentages in fortune?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions