In this tutorial, you will learn two different ways of concatenating strings in Bash:
firstString="I am learning " secondString=" Bash Shell Scripting." thirdString=$firstString$secondString echo $thirdString
Output of the above program
I am learning Bash Shell Scripting.
Note: This technique is used in IFS(Internal Field Separator) to specify more than one characters. Suppose you want to specify newline, semicolon, and colon as field separators then you will write IFS=$'\n';:
or IFS='\n';:
firstString="Bash Shell Scripting" secondString="$firstString is amazing." echo $secondString
Output of the above program
Bash Shell Scripting is amazing.