I source these variables from a txt file in CentOS bash shell:
NAME01=dns1
HOST01=1.1.1.1
NAME02=dns2
HOST02=1.1.2.2
NAME03=dns3
HOST03=1.1.2.3
## many more lines of similar
NUM=02
How can I use $HOST$NUM to give me 1.1.2.2, such as:
echo $HOST$NUM