I'm working to create a simple script where I can save each line as a variable for later use. However it didn't go well. Can anybody help me please.
read -p "Enter the number of user and press [ENTER]:" num
for ((i=1; i<=$num; i++)); do
var$i="|-> Line $i"
echo "var$i"
done
I'm trying to obtain the output that looks like this
|-> Line 1
|-> Line 2
|-> Line 3
|-> Line 4