I'm writing a shell script as below.
#/bin/bash
ip1="1.1.1.1"
ip2="2.2.2.2"
for ((i=1; i<=2; i++))
do
echo "$[ip$i]"
done
i get the error after run.
./1.sh: line 8: 1.1.1.1: syntax error: invalid arithmetic operator (error token is ".1.1.1")
Thank you so much !