-
-
Save jjasghar/93f5a74f15be3e59e6cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
let num=${1%d*} | |
let die=${1#*d} | |
let result="$num*($[$RANDOM % $die]+1)" | |
print $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment