GNU bug report logs -
#20572
bug about sed when use -i
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20572 in the body.
You can then email your comments to 20572 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Thu, 14 May 2015 09:17:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lu Qin <luq.java <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Thu, 14 May 2015 09:17:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Thu, 14 May 2015 10:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Thu, 14 May 2015 15:17:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 20572 <at> debbugs.gnu.org (full text, mbox):
tags 20572 moreinfo
thanks
On Thu, May 14, 2015 at 2:00 AM, 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 think Davide's guess that you are using some other version of sed is right.
Please tell us what "sed --version" prints.
If you are using some version of GNU sed it must be out of date;
repeat your test using the latest: sed-4.2.2 and let us know.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Thu, 14 May 2015 22:40:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 20572 <at> debbugs.gnu.org (full text, mbox):
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.
$ tar xzf accumulo-1.6.2-src.tar.gz
$ cd accumulo-1.6.2/trace
$ sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed <at> gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
$ 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
$ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
$ 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
sed: can't read : No such file or directory
$ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
I see that it is not a bug.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Fri, 15 May 2015 01:55:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 20572 <at> debbugs.gnu.org (full text, mbox):
Thank you for you replay.
I google the problem and I found that It is because I use mac and the sed version is not same as the GNU sed .
> 在 2015年5月15日,06:39,Norihiro Tanaka <noritnk <at> kcn.ne.jp> 写道:
>
>
> 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.
>
> $ tar xzf accumulo-1.6.2-src.tar.gz
> $ cd accumulo-1.6.2/trace
>
> $ sed --version
> sed (GNU sed) 4.2.2
> Copyright (C) 2012 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Jay Fenlason, Tom Lord, Ken Pizzini,
> and Paolo Bonzini.
> GNU sed home page: <http://www.gnu.org/software/sed/>.
> General help using GNU software: <http://www.gnu.org/gethelp/>.
> E-mail bug reports to: <bug-sed <at> gnu.org>.
> Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
>
> $ 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
>
> $ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
> src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
>
> $ 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
> sed: can't read : No such file or directory
>
> $ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
> src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
>
>
> I see that it is not a bug.
>
>
Information forwarded
to
bug-sed <at> gnu.org
:
bug#20572
; Package
sed
.
(Sun, 17 May 2015 02:18:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 20572 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 20572 notabug
close 20572
thanks
Thanks for confirming that the problem was not with GNU sed.
On Thu, May 14, 2015 at 6:55 PM Lu Qin <luq.java <at> gmail.com> wrote:
>
> Thank you for you replay.
>
> I google the problem and I found that It is because I use mac and the sed
> version is not same as the GNU sed .
>
>
> > 在 2015年5月15日,06:39,Norihiro Tanaka <noritnk <at> kcn.ne.jp> 写道:
> >
> >
> > 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.
> >
> > $ tar xzf accumulo-1.6.2-src.tar.gz
> > $ cd accumulo-1.6.2/trace
> >
> > $ sed --version
> > sed (GNU sed) 4.2.2
> > Copyright (C) 2012 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>.
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.
> >
> > Written by Jay Fenlason, Tom Lord, Ken Pizzini,
> > and Paolo Bonzini.
> > GNU sed home page: <http://www.gnu.org/software/sed/>.
> > General help using GNU software: <http://www.gnu.org/gethelp/>.
> > E-mail bug reports to: <bug-sed <at> gnu.org>.
> > Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
> >
> > $ 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
> >
> > $ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
> > src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
> >
> > $ 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
> > sed: can't read : No such file or directory
> >
> > $ ls src/main/java/org/apache/accumulo/trace/thrift/TInfo.java*
> > src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
> >
> >
> > I see that it is not a bug.
> >
> >
>
>
>
>
>
>
[Message part 2 (text/html, inline)]
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 24 Jan 2017 23:33:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
20572 <at> debbugs.gnu.org and Lu Qin <luq.java <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 24 Jan 2017 23:33:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 22 Feb 2017 12:24:07 GMT)
Full text and
rfc822 format available.
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.