From owner-freebsd-bugs Thu Jun 20 14:30:41 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 441A637B41C for ; Thu, 20 Jun 2002 14:30:10 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5KLU6h77623; Thu, 20 Jun 2002 14:30:06 -0700 (PDT) (envelope-from gnats) Date: Thu, 20 Jun 2002 14:30:06 -0700 (PDT) Message-Id: <200206202130.g5KLU6h77623@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Matthew Hunt Subject: Re: bin/39599: sed -i -e '[...]' file saves backup file with extension -e Reply-To: Matthew Hunt Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/39599; it has been noted by GNATS. From: Matthew Hunt To: Oliver Braun Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/39599: sed -i -e '[...]' file saves backup file with extension -e Date: Thu, 20 Jun 2002 14:29:17 -0700 On Thu, Jun 20, 2002 at 11:00:26PM +0200, Oliver Braun wrote: > If sed(1) is called with -i flag without an extension the following characters > will be used as extension. man sed says: If a zero-length extension is given, > no backup will be saved. I think you actually need to provide the zero-length extension: sed -i "" -e 's/foo/bar/g' filename -- Matthew Hunt * Clearly there are more things in the http://www.pobox.com/~mph/ * heavens than anyone anticipated. -enp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message