Collapse multiple spaces into one.
Section: Formatting and Cleanup
Squeeze repeated spaces
bash
bash
tr -s ' ' < input.txtExplanation
Good for cleaning space-delimited text before further parsing.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Formatting and Cleanup