💾 Archived View for ait.place › roll.gmi captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
There did not seem to be a shell script that simply rolled a couple of dice.
So I made a simple script that does it.
The syntax is as follows:
$ roll 2d20
This will roll two twenty sided dices
The output only gives the output of the rolls and nothing more.
#!/bin/sh input=$* [ -z "$input" ] && input=2d20 for request in $input ; do # check if format is correct echo $request| egrep -vq '^[0-9]+d[0-9]+