Dr Adam Stanton

Researcher in Adaptive Informatics

2018-04-26
by as
0 comments

How can I make D&D more nerdy?

Here’s a bash function for rolling the dice! d() { if echo $1 | egrep -q “[0-9]*d[0-9]+($|(?:(?:\+|\-){1}[0-9]+$){1})”; then eval $( echo $1 | awk -F'[d+-]’ ‘{print “n=”$1″;s=”$2”;m=”$3}’ ); t=0; for (( c=1; c