14387 shaares
5333 private links
5333 private links
One of the most commonly used string operations is concatenation. String concatenation is just a fancy programming word for joining strings together by appending one string to the end of another string.
In this tutorial, we will explain how to concatenate strings in Bash.
Concatenating Strings
The simplest way to concatenate two or more string variables is to write them one after another:
VAR1="Hello,"
VAR2=" World"
VAR3="$VAR1$VAR2"
echo "$VAR3"