On Wed, 2004-09-08 at 00:33, Jerome Lyles wrote:
...
> Can someone point me to a sed or shell script that I can use on a text file to 
> remove the whitespace between the letters in the words only?   Here is the 
> top of the script file as it stands now:
> 
> - -   C r e a t e   C u s t o m e r s   t a b l e 
>  

$ echo '- -   C r e a t e   C u s t o m e r s   t a b l e' |
        sed -e 's/\([^ ]\) \([^ ]\)/\1\2/g' -e 's/\([^ ]\) \([^ ]\)/\1\2/g' -e 's/  */ 
/g'
-- Create Customers table

-- 
Oliver Elphick                                          [EMAIL PROTECTED]
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Put on the whole armor of God, that ye may be able to 
      stand against the wiles of the devil."        
                                        Ephesians 6:11 


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to