#!/bin/bash
s="a
b
c"

awk '{ print NR==1 ? $0"," : $0 }' <<< "$s"

sed '1s/$/,/' <<< "$s"