How to concatenate string variables in Bash
Asked 07 September, 2021
Viewed 1.5K times
  • 51
Votes

In PHP, strings are concatenated together as follows:

$foo = "Hello";
$foo .= " World";

Here, $foo becomes "Hello World".

How is this accomplished in Bash?

30 Answer