add comma at the end of each line in bash string code example Example: bash add comma to end of line sed "s/$/,/g"