GNU bug report logs -
#36489
possible bug by sed?
Previous Next
Reported by: Steven Abner <pheonix.sja <at> att.net>
Date: Wed, 3 Jul 2019 14:46:01 UTC
Severity: normal
Tags: moreinfo, 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 36489 in the body.
You can then email your comments to 36489 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#36489
; Package
sed
.
(Wed, 03 Jul 2019 14:46:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Steven Abner <pheonix.sja <at> att.net>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Wed, 03 Jul 2019 14:46:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Using:
grep -rlI ~/Development/PheonixOS -e 'as_sys_types.h' | xargs sed -i
's <at> as_sys_types.h <at> as_types.h <at> g'
on ElementaryOS did its job except it truncated a few files' last line.
In otherwords, file ends up one line
short, and had no replacement on that line.
Only found problem because of had identical copies on my mac, and did
same thing, except BSD variant:
grep -rlI ~/Development/Pheonix -e 'as_sys_types.h' | xargs sed -i ""
's <at> as_sys_types.h <at> as_types.h <at> g'
Then I verify changes by using diff command. Several files on linux
lost last line.
As stated in subject, 'possible', because it could belong to 'xargs'?
Thx and sorry to contact
Steve
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-sed <at> gnu.org
:
bug#36489
; Package
sed
.
(Thu, 04 Jul 2019 08:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 36489 <at> debbugs.gnu.org (full text, mbox):
tag 36489 moreinfo
stop
Hello,
On Wed, Jul 03, 2019 at 10:35:33AM -0400, Steven Abner wrote:
> Hi,
> Using:
> grep -rlI ~/Development/PheonixOS -e 'as_sys_types.h' | xargs sed -i
> 's <at> as_sys_types.h <at> as_types.h <at> g'
> on ElementaryOS did its job except it truncated a few files' last line. In
> otherwords, file ends up one line
> short, and had no replacement on that line.
> Only found problem because of had identical copies on my mac, and did same
> thing, except BSD variant:
> grep -rlI ~/Development/Pheonix -e 'as_sys_types.h' | xargs sed -i ""
> 's <at> as_sys_types.h <at> as_types.h <at> g'
> Then I verify changes by using diff command. Several files on linux lost
> last line.
> As stated in subject, 'possible', because it could belong to 'xargs'?
We'll need a bit more information to be able to diagnose this issue.
First,
which version of 'sed' are you using (try "sed --version").
If this isn't a recent version (4.7), can you also try
with version 4.7 ?
Second,
Is this reproducible?
Can you narrow it down to a single file using only "sed" (without
grep/xargs) ?
If so, can you share the file?
(To ease testing, you can add a backup extension to the "-i" parameter,
similar to bsd: "sed -i.bak [...]" - the original files will be saved).
Third,
A cursory attempt to run a similar command on my computer
did not show this issue, I tried with the following commands:
for i in a b c d e ; \
do ( seq 10 ; printf "AAA as_sys_types.h\n" ) > $i ; done
grep -rlI ./ -e 'as_sys_types.h' \
| xargs sed -i 's <at> as_sys_types.h <at> as_types.h <at> g'
regards,
- assaf
Added tag(s) moreinfo.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 04 Jul 2019 08:21:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#36489
; Package
sed
.
(Wed, 10 Jul 2019 01:47:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 36489 <at> debbugs.gnu.org (full text, mbox):
tag 36489 notabug
close 36489
stop
On Thu, Jul 04, 2019 at 02:20:33AM -0600, Assaf Gordon wrote:
> On Wed, Jul 03, 2019 at 10:35:33AM -0400, Steven Abner wrote:
> > grep -rlI ~/Development/PheonixOS -e 'as_sys_types.h' | xargs sed -i
> > 's <at> as_sys_types.h <at> as_types.h <at> g'
> > on ElementaryOS did its job except it truncated a few files' last line. In
> > otherwords, file ends up one line
[...]
> Is this reproducible?
> Can you narrow it down to a single file using only "sed" (without
> grep/xargs) ?
Confirmed off-list that this is not reproducible, and likely due to
other issues, not a sed bug.
As such, I'm closing this item.
Discussion can continue by replying to this thread.
-assaf
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Jul 2019 01:47:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
36489 <at> debbugs.gnu.org and Steven Abner <pheonix.sja <at> att.net>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Jul 2019 01:47:03 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, 07 Aug 2019 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.