LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

roll

Simulate dice rolls with RPG notation

TLDR

Roll dice
$ roll [2d6]
copy
Roll with modifier
$ roll [1d20+5]
copy
Roll multiple times
$ roll [3x4d6]
copy
Verbose output showing each die
$ roll -v [2d6]
copy
Sum only output
$ roll -s [2d6]
copy
Roll percentile
$ roll [1d100]
copy
Roll with negative modifier
$ roll [1d20-2]
copy
Multiple dice expressions
$ roll [1d20] [2d6+3]
copy

SYNOPSIS

roll [-v] dice-expression ...

DESCRIPTION

roll is a command-line dice roller that parses standard RPG dice notation in the NdS format, where N is the number of dice and S is the number of sides. It supports modifiers (+ or -) for adding or subtracting fixed values, and the TxNdS format for rolling the same expression multiple times.
Multiple dice expressions can be specified on a single command line. The -v flag shows individual die results in addition to the total sum, while -s outputs only the final sum. Common RPG dice like d4, d6, d8, d10, d12, d20, and d100 (percentile) are all supported through the flexible notation.

PARAMETERS

-v

Verbose, show each die.
-s
Sum only output.
NdS
N dice with S sides.
NdS+M
Add modifier M.
TxNdS
Roll T times.

CAVEATS

Random source varies. Not cryptographically secure. Fun utility only.

HISTORY

roll is a simple command-line dice roller implementing standard RPG dice notation for tabletop gaming.

SEE ALSO

rolldice(6), shuf(1)

Copied to clipboard
Kai