Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove spaces between letters ?

89 views
Skip to first unread message

lisz...@aliceadsl.fr

unread,
May 20, 2008, 9:37:11 AM5/20/08
to
Hi,

Can anyone help me to remove some spaces in a text like here ?

==========

> Y o u t y p e i n t h e p h r a s e , a n d c a n a d d i t i o n a l l y s e t s o m e g r a > m m a t i c a l

==========

Ok there are 3 spaces between the words....
maybe there is a solution in Vim but i didn't found it yet..

TIA,

L

Timo Salmi

unread,
May 20, 2008, 10:44:06 AM5/20/08
to
lisz...@aliceadsl.fr wrote:
> Can anyone help me to remove some spaces in a text like here ?
>> Y o u t y p e i n t h e p h r a s e , a n d c a n a d d i t i o n a l l y s e t s o m e g r a > m m a t i c a l

sed -e "s/ /XXX/g" -e "s/ //g" -e "s/XXX/ /g"

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html

lisz...@aliceadsl.fr

unread,
May 20, 2008, 3:48:50 PM5/20/08
to
On 20 mai, 16:44, Timo Salmi <t...@uwasa.fi> wrote:

> liszt...@aliceadsl.fr wrote:
> > Can anyone help me to remove some spaces in a text like here ?
> >> Y o u t y p e i n t h e p h r a s e , a n d c a n a d d i t i o n a l l y s e t s o m e g r a > m m a t i c a l
>
> sed -e "s/ /XXX/g" -e "s/ //g" -e "s/XXX/ /g"
>
> All the best, Timo
>
> --
> Prof. Timo Salmi ftp &http://garbo.uwasa.fi/archives 193.166.120.5

Timo Salmi

unread,
May 25, 2008, 3:43:54 AM5/25/08
to
Timo Salmi <t...@uwasa.fi> wrote:
> lisz...@aliceadsl.fr wrote:
>> Can anyone help me to remove some spaces in a text like here ?
>>> Y o u t y p e i n t h e p h r a s e , a n d c a n a d d
>>> i t i o n a l l y s e t s o m e g r a > m m a t i c a l
>
> sed -e "s/ /XXX/g" -e "s/ //g" -e "s/XXX/ /g"

Depending on how the spaced file has been created another potential UNIX
port solution is

type myfile.txt | tr -d \000

For more see the end part of
http://www.netikka.net/tsneti/info/tscmd028.htm

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland

Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm

lisz...@aliceadsl.fr

unread,
Jun 11, 2008, 4:15:19 AM6/11/08
to
On 25 mai, 09:43, Timo Salmi <t...@uwasa.fi> wrote:
> Timo Salmi <t...@uwasa.fi> wrote:
> > liszt...@aliceadsl.fr wrote:
> >> Can anyone help me to remove some spaces in a text like here ?
> >>> Y o u t y p e i n t h e p h r a s e , a n d c a n a d d
> >>> i t i o n a l l y s e t s o m e g r a > m m a t i c a l
>
> > sed -e "s/ /XXX/g" -e "s/ //g" -e "s/XXX/ /g"
>
> Depending on how the spaced file has been created another potential UNIX
> port solution is
>
> type myfile.txt | tr -d \000
>
> For more see the end part ofhttp://www.netikka.net/tsneti/info/tscmd028.htm
>
Ok i have a port of Tr

Thanks, and your first solution was OK. i did a similar trick with
Vim

L

0 new messages