Convert specified column in a multi-line string into single comma-separated line

Clean and simple:

awk '{print $2}' file.txt | paste -s -d, -

Leave a Comment