Bash Replace Spaces with a Comma May 9, 2023 • Ulysses 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.