Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 14:30:06 -0700 (PDT)
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/39599: sed -i -e '[...]' file saves backup file with extension -e
Message-ID:  <200206202130.g5KLU6h77623@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/39599; it has been noted by GNATS.

From: Matthew Hunt <mph@astro.caltech.edu>
To: Oliver Braun <obraun@informatik.unibw-muenchen.de>
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 <mph@astro.caltech.edu> * 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




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