The shell is splitting the msgs variable so echo get multiple parameters.
You need to quote your variable to prevent this to happen:
echo "$msgs"
The shell is splitting the msgs variable so echo get multiple parameters.
You need to quote your variable to prevent this to happen:
echo "$msgs"