Read multiple inputs then store that in an array or variables, then print the values from that array/variables in shell script
read -p " Enter no. of users : " no_user
if [ $no_user -gt 1 ]; then
for ((i=1;; i++)); do
read -p "Enter Mob no ($i) : " $[mob$i]
if [ $i == $no_user ]; then break; fi
done
else
read -p "Enter Mob no ($i) : " mob$i
fi
if [ $no_user > 1 ]; then
for ((i=1;; i++)); do
echo "Mobile no $i = " $[mob$i]
if [ $i == $no_user ]; then break; fi
done
fi