shell - Assigning space to variables in Unix -


suppose if want print 3 variables variables

var1="123" var2="   " var3="456" echo $var1$var2$var3 

the result got executing command 123 456; wanting 3 spaces rather single space.

kindly suggest technique print it.

use double quotes:

echo "$var1$var2$var3" 

many problems resolved using double quotes.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -