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
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
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
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us