Apologies if this has been asked before; I could not find any shell-related answers.
I have a text file with white space that has varying amounts of white space in between the strings.
Example:
chafa libgusb libvirt-glib needle simple-scan cryptominisat libpulsar lsd oxipng spice-protocol python docker-machine-completion hss nomad ruby@2.4 python@2 doitlive hstr numpy ruby@2.5 readline dwarf hunspell octave sdcv sqlite eccodes imagemagick opendbx sip
Desired output:
chafa libgusb libvirt-glib needle simple-scan cryptominisat libpulsar lsd oxipng spice-protocol python
I've tried a few sed, tr, cut, perl and other attempts but can't seem to cut the variable white space down to a single white space character.
Any help would be greatly appreciated.