Re: Input and output for program

Shawn Bayern (shawn.bayern@yale.edu)
Wed, 20 Jan 1999 16:03:14 -0500 (EST)

On Wed, 20 Jan 1999, Chad Redman wrote:

> 1) For the middle substitution, use /g to get rid of multiple matches,
> rather than just the first:
> 's/ \. / /g'

That may not do what you think it does. Remember that global substitutions
in sed work for *nonoverlapping* patterns.

Applying 's/ \. / /g' to

a . . . . b

will yield

a . . b

Shawn

PS - What's the status of the newsgroup/mailing-list bridge? I see
news+yale.users.linux@tequila.cs.yale.edu subscribed to linux-list, but
the bridge doesn't seem active. No big deal... I'm just curious.