hi everyone
pls pls help in the query below
it's urgent
pls
-bash-3.00$ abc=deepak
-bash-3.00$ a=1
-bash-3.00$ def_${a}=$abc
-bash: def_1=deepak: command not found
y iti is giving error ?
hi everyone
pls pls help in the query below
it's urgent
pls
-bash-3.00$ abc=deepak
-bash-3.00$ a=1
-bash-3.00$ def_${a}=$abc
-bash: def_1=deepak: command not found
y iti is giving error ?
eval def_${a}=$abc
Jean-Pierre.
it is still giving error now on displaying the value
-bash-3.00$ abc=deepak
-bash-3.00$ a=1
-bash-3.00$ eval def_${a}=${abc}
-bash-3.00$ echo ${def_${a}}
-bash: ${def_${a}}: bad substitution
---------- Post updated at 03:43 AM ---------- Previous update was at 03:43 AM ----------
it is still giving error now on displaying the value
-bash-3.00$ abc=deepak
-bash-3.00$ a=1
-bash-3.00$ eval def_${a}=${abc}
-bash-3.00$ echo ${def_${a}}
-bash: ${def_${a}}: bad substitution
---------- Post updated at 03:43 AM ---------- Previous update was at 03:43 AM ----------
it is still giving error now on displaying the value
-bash-3.00$ abc=deepak
-bash-3.00$ a=1
-bash-3.00$ eval def_${a}=${abc}
-bash-3.00$ echo ${def_${a}}
-bash: ${def_${a}}: bad substitution
$ abc=deepak
$ a=1
$ eval def_${a}=${abc}
$ eval echo \${def_${a}}
deepak
$
$ vname=def_${a}
$ eval echo \${${vname}}
deepak
$
$ vname=def_${a}
$ echo ${!vname}
deepak
$
Jean-Pierre.