fork(1) download
  1. #!/bin/bash
  2. s="a
  3. b
  4. c"
  5.  
  6. awk '{ print NR==1 ? $0"," : $0 }' <<< "$s"
  7.  
  8. sed '1s/$/,/' <<< "$s"
Success #stdin #stdout 0s 23336KB
stdin
Standard input is empty
stdout
a,
b
c
a,
b
c