$ VAR1="Hello" $ VAR2="World" $ VAR3="${VAR1}, ${VAR2}" $ echo "${VAR3}"
We can also use += operator to concatenate strings
$ VAR1="Hello, " $ VAR2="World!" $ VAR1+="${VAR1}" $ echo "${VAR1}"
Source: Linuxize
Last updated 4 months ago