Answers for "bash concencate strings"

18

combine strings bash

foo="Hello"
foo="${foo} World"
echo "${foo}"
> Hello World
Posted by: Guest on May-06-2020
0

How to concatenate string variables in Bash

Bash also supports a += operator as shown in this code:

A="X Y"
A+=" Z"
echo "$A"
output

X Y Z
Posted by: Guest on February-05-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language