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
2018-04-26
by as
0 comments
2018-04-26
by as
0 comments
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