Hello all,
I have a text file(vfile) that records all the variable names, something like
#cat vfile | head -1
file1 v_name1 v_name2 v_name3
I want to display the value of the variable by querying this file, however, it seems I could not by simplying doing below, need some idea how to accomplish this. Thanks.
echo $v_name1
10.1.2.3:7000
echo $"`cat vfile | head -1 | awk '{print $2}'"
v_name1
how can I get 10.1.2.3:7000 instead of v_name1?
I have a text file(vfile) that records all the variable names, something like
#cat vfile | head -1
file1 v_name1 v_name2 v_name3
I want to display the value of the variable by querying this file, however, it seems I could not by simplying doing below, need some idea how to accomplish this. Thanks.
echo $v_name1
10.1.2.3:7000
echo $"`cat vfile | head -1 | awk '{print $2}'"
v_name1
how can I get 10.1.2.3:7000 instead of v_name1?