Turning a Multi-Line File Into a CSV File

Date April 10, 2008 by Isaac

Linux has many amazing programs that can be chained together to produce amazing results. Today I needed to turn a multi-line file into a CSV (comma separated) file. In Linux this is super easy: cat file | tr ‘\n’ ‘,’ Basically, this will turn a file like this: Line1 Line2 Line3 Line4 Into this: Line1,Line2,Line3,Line4