Bash string concatenate

From thelinuxwiki
Revision as of 22:26, 25 February 2013 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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”