First of all I'm sorry for a probable bad title, but I don't even know what to call this.
I'm trying the following:
#!/bin/sh
VAR1="28-00000202070c"
VAR2="28-0000018776d3"
VAR3="28-0000033a6174"
for sensor in VAR1 VAR2 VAR3
do
echo "$sensor: $$sensor"
done
The expected output would be:
VAR1: 28-00000202070c
VAR2: 28-0000018776d3
VAR3: 28-0000033a6174
The real output is:
VAR1: 24038sensor
VAR2: 24038sensor
VAR3: 24038sensor
and the strange prefix number keeps growing...
VAR1: 24039sensor
VAR2: 24039sensor
VAR3: 24039sensor
...
I'd like to ask:
1) What are the correct terms/keywords that describe what I'm trying to do here
2) How to get to the expected output
Thanks, Joaoabs