Page is a not externally linkable
phranque - 8:28 am on Sep 17, 2010 (gmt 0)
those first two examples won't work because sed doesn't support BRE.
combining all of the above, try this:
perl -p -i.bak -e 's/\s\s+/,/g;' filename.txt
this will create a backup and then loop through filename.txt, replacing two or more consecutive whitespace characters with a single comma.
i'm guessing \s\s+ is a more efficient regexp than \s{2,} but they both work.