[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Spaces :: Need Help



  blah    blah   blah     : hb  asdf   124

should become

  blah blah blah : hb asdf 124

The following works with data containing tabs as well.

sed 's/  */ /g;s/               */ /g' filename

Translated: sed 's/<space><space>*/<space>/g;s/<ctrl+v><ctrl+i><ctrl+v><ctrl+i>*/<space>/g' filename

Note: To insert a tab within bash or tcsh type ^V^I (ctrl+v,ctrl+i)
--
Josh Olson
System Administrator,  Auxiliary Technologies
Michigan Technological University
(906)487-3523