Skip to main content
deleted 66 characters in body
Source Link
Echoes_86
  • 770
  • 4
  • 8

Try just converting newline with ,:

    <your command> | tr -s '\n' ','

If you want to use awk, just print with no newline:

    <your command> | awk ''NR > 1 {printf "%sprintf(",") } {printf "%s",$0}'

Try just converting newline with ,:

    <your command> | tr -s '\n' ','

If you want to use awk, just print with no newline:

    <your command> | awk '{printf "%s,",$0}'

If you want to use awk, just print with no newline:

    <your command> | awk 'NR > 1 { printf(",") } {printf "%s",$0}'
Source Link
Echoes_86
  • 770
  • 4
  • 8

Try just converting newline with ,:

    <your command> | tr -s '\n' ','

If you want to use awk, just print with no newline:

    <your command> | awk '{printf "%s,",$0}'