String concatenation doesn't work for comma character
String concatenation on bash script doesn't work on comma "," character. A="Hello"; B=",World"; C=$A$B echo $C; It prints the output as Hello World Bash version is: GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) The same code seems to work in here The most likely explanation is that you have $IFS set to , The simplest way around this is to double-quote $C , in which case echo is passed the value unmodified : echo "$C" Also note that you don't need the semicolons to terminate your commands, given that each command is on its own line. To print the current value of $IFS in