Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Runtime variable extraction

$
0
0
Hi There,

var1=value1
var2=value2
var3=value3

for (( i=1; i<4; i++ ))
do
temp=var$i
echo "$temp"
done

OUTPUT
var1
var2
var3


I want the output to be
value1
value2
value3


How can I achieve this?

Regrads
Jagpreet

Viewing all articles
Browse latest Browse all 16232

Trending Articles