BASH: Substituting a variable inside a variable during echo -


i explained question in comments:

var= ins="installing $var"  echo $ins    .           # in each echo command want dynamically substitute .           # $var variable in $ins variable. want echo $ins   # substitution of variable on echo command. 

is possible?

you need function job gracefully.

say() {     echo "installing $ins" }  ins=hello  ins=world 

or this:

say() {     echo "installing $@" }  hello  world 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -