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

.net - Transaction locking an Insert statement -

clojure - Best way to lazily collapse multiple contiguous items of a sequence into a single item -

remove Repeat values from a list in haskell -