in reply to Replacing double spaces (was: Reaplcing double spaces)
Hmmm... tr just does translating. ie, First character in the left hand list gets replaced with the first character in the right hand list, etc. Try replacing tr with s and adding "g" to the end. If you've got a variable number of spaces something like: s/ +/|/g should work.
(see update II) Since it's 2 or more, use this: s/ +/|/gThat's two spaces, then a + to gobble the additional spaces.
HTH
-Ducky
update:Gah! typos galore! =/
update II:Based on the reply, added a mo' bettah, should work kinda answer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reaplcing double spaces
by DaWolf (Curate) on Sep 24, 2001 at 07:54 UTC | |
|
Re: Re: Reaplcing double spaces
by DaWolf (Curate) on Sep 24, 2001 at 00:05 UTC | |
by ducky (Scribe) on Sep 24, 2001 at 01:00 UTC |