Bash string concatenate

From thelinuxwiki
Jump to: navigation, search

concatenate strings in bash


let’s say you’ve got:

  $j=”foo”

and you’d like to tack on its good partner ‘bar’. then, use the dollar sign and curly braces to delineate variable from string:

  $k=”${j}bar”