From owner-freebsd-questions Mon May 11 16:23:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA16509 for freebsd-questions-outgoing; Mon, 11 May 1998 16:23:24 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hermes.iaccess.com.au (hermes.iaccess.com.au [203.5.74.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA16501 for ; Mon, 11 May 1998 16:23:17 -0700 (PDT) (envelope-from andrew@iaccess.com.au) Received: from alpine.iaccess (alpine.iaccess.com.au [203.5.74.227]) by hermes.iaccess.com.au (8.8.5/8.8.5) with SMTP id JAA04186; Tue, 12 May 1998 09:22:52 +1000 (EST) Message-ID: <017401bd7d34$4dcb9180$e34a05cb@alpine.iaccess> From: "Andrew Specht" To: "Greg Lehey" , Subject: Re: sed??? Date: Tue, 12 May 1998 09:27:02 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG woohooo it worked :) thanks for that Andrew Specht | System Administrator E-mail: andrew@iaccess.com.au | Internet Access Australia Internet: http://www.iaccess.com.au | Melbourne, Australia -----Original Message----- From: Greg Lehey To: Andrew Specht ; freebsd-questions@FreeBSD.ORG Date: Monday, May 11, 1998 7:05 PM Subject: Re: sed??? >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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message