add two random dice number and print the result in shell script code example
Example 1: 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
Example 2: 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