Answers for "add two random dice number and print the result in shell script"

2

bash generate random number between

#If you have coreutils installed and want a number inbewtween a value
shuf -i MIN-MAX -n 1
#or you can use bash 
$RANDOM
Posted by: Guest on May-14-2020
0

add two random dice number and print the result in shell script

#! /bin/bash
        dice1=$((RANDOM%6))
        dice2=$((RANDOM%6))
        sum=$((dice1+dice2))
        echo=$sum
Posted by: Guest on March-22-2021
0

add two random dice number and print the result in shell script

#! /bin/bash
        dice1=$((RANDOM%6))
        dice2=$((RANDOM%6))
        sum=$((dice1+dice2))
        echo=$sum
Posted by: Guest on October-15-2021

Code answers related to "add two random dice number and print the result in shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language