GNU bug report logs - #20572
bug about sed when use -i

Previous Next

Package: sed;

Reported by: Lu Qin <luq.java <at> gmail.com>

Date: Thu, 14 May 2015 09:17:03 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Davide Brini <dave_br <at> gmx.com>
To: bug-sed <at> gnu.org
Subject: Re: bug#20572: bug about sed when use -i
Date: Thu, 14 May 2015 12:22:49 +0200
On Thu, 14 May 2015 17:00:58 +0800, Lu Qin <luq.java <at> gmail.com> wrote:

> when I use sed like this :
> 
> sed -i  -e 's/\(public class TInfo .*\)$/\1\
> \
>   private static final long serialVersionUID = -4659975753252858243l;
> \/\/ See ACCUMULO-3132\ /'
> src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
> 
> It will create a file name TInfo.java-e as a backup,but the -e is not the
> backup extension I use.
> 
> 
> If I use it like this:
> sed -i ''  -e 's/\(public class TInfo .*\)$/\1\
> \
>   private static final long serialVersionUID = -4659975753252858243l;
> \/\/ See ACCUMULO-3132\ /'
> src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
> 
> It will be work ok and not create a backup file what I want.

I'm almost sure that you're not using GNU sed.

-- 
D.




This bug report was last modified 8 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.