Replace spaces with commas from one file and send the output to another file.

<pre lang="bash">
tr -s '[:blank:]' ', '  output.txt

It’s perfect for creating a comma delimited file for importing to Excel.