Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 May 1998 17:25:40 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Andrew Specht <andrew@iaccess.com.au>, freebsd-questions@FreeBSD.ORG
Subject:   Re: sed???
Message-ID:  <19980511172540.B20153@freebie.lemis.com>
In-Reply-To: <036c01bd7ca9$257ce020$e34a05cb@alpine.iaccess>; from Andrew Specht on Mon, May 11, 1998 at 04:50:55PM %2B1000
References:  <036c01bd7ca9$257ce020$e34a05cb@alpine.iaccess>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 May 1998 at 16:50:55 +1000, Andrew Specht wrote:
> Hi
>
> I'm trying to figure out how to substitute multiple spaces from a text file
> with a single space using sed.
>
> this didn't work:
>
> sed /[" "]+//s//[" "]/ test

No, it wouldn't.

sed 's:   *: :g' test

Those are three spaces before the *; the first two because that's the
minimum you want to consider changing, and the third one because
there's no + operator in sed.

Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980511172540.B20153>