i have variables from x0 to x9 and i created a random number randomnum=$((RANDOM % 10)) now i want to put them as:-
#! /bin/bash
x0="1"
x1="1"
x2="1"
x3="1"
x4="1"
x5="0"
x6="0"
x7="0"
x8="0"
x9="0"
player1=1
if [[ $x$randomnum == $player1 ]]; then
echo "it end!"
fi
here i want to combine $x and $randomnumber. how would i do that?