From: [email-masked]
Date: Sun, 21 Feb 1993 23:48:41 -0500

How about:

	y/^ +/ x/ +/ c/ /

that's using ^ again; i thought the exercise was to avoid it.
at least, that is the exercise i've been working on.
when i made my suggestion
	x s2/ +/ /g
i implicitly assumed, as i think did the original poster, that
each line began with white space.  as i sit here now, i can't
find a clean-enough-to-use version that doesn't use ^.  the
magic thing about ^ is that it works at the beginning of the file;
otherwise i could cheat.  the poster said he had whole lines, hence:

	-#1,. x/\n?.+/ v/\n/ x/ +/ c/ /

but this is already too silly.

-rob

---

From: David Hogan <[email-masked]>
Date: Mon, 22 Feb 1993 22:26:28 -0500

> From:	[email-masked]

> at least, that is the exercise i've been working on.

I thought the point was to avoid using it in sub-commands.  Although
the command we are trying to find might have to be the sub-command of
another x command, I suppose.

> each line began with white space.
>[...]

Hmmm, I missed that when I first read the post.
Anyway, here's another way to do it:

	x/[^ ].*/ s/ +/ /g

(Dang! That ^ is unavoidable :-)