💾 Archived View for ait.place › roll.gmi captured on 2022-07-16 at 13:28:42. 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]+