Bash and variables -



Bash and variables -

scenario

$ var1=test

$ var2=testing

$ var3=$var1_$var2

$ echo $var3

testing

i expected "test_testing" output. why not working? how output in "test_testing" format? (make $var1_$var2 work)

does interprets var3=$var1_$var2 var3=$(var1_$var2) ?

try:

var3="$var1"_"$var2"

it interprets var3=$var1_$var2 $var1_ + $var2 --- there no variable named $var1_

bash

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -