How to concatenate strings in a bash script? -


how concatenate 2 strings in bash script?

example: concate "foo" , "bar", without creating new variable "bar".

var="foo"

echo "$varbar"

this not work, because considered variable name varbar.

this can work:

echo "${var}bar" 

if put brackets " wrapping name, can concatenate desired. it, bash understands name of variable "var" , rest text.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

Delphi interface implements -

java - How to create Table using Apache PDFBox -