awk '{ a=a"," $0 } END { print substr(a, 2) }' your_text_file