GNU bug report logs - #24072
sed bug search or replace newline chars

Previous Next

Package: sed;

Reported by: Bee <beeyawned <at> gmail.com>

Date: Tue, 26 Jul 2016 07:04:01 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 24072 in the body.
You can then email your comments to 24072 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-sed <at> gnu.org:
bug#24072; Package sed. (Tue, 26 Jul 2016 07:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bee <beeyawned <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-sed <at> gnu.org. (Tue, 26 Jul 2016 07:04:02 GMT) Full text and rfc822 format available.

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

From: Bee <beeyawned <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: sed bug search or replace newline chars
Date: Mon, 25 Jul 2016 20:21:02 -0700
lubuntu 16.04
sed --version
sed (GNU sed) 4.2.2

I have recurring files exported from a database with stray newline chars.  I would like to remove them with sed but nothing is changed.

It works to use tr:
cat xxx.txt | tr '\n' '\t' > yyy.txt

These hex and control codes work:
sed -e 'y/\x0d/\x09/' xxx.txt > yyy.txt
sed -e 'y/\r/\x09/' xxx.txt > yyy.txt
sed -e 'y/\r/\t/' xxx.txt > yyy.txt

But these do nothing:
sed -e 'y/\x0a/\x09/' xxx.txt > yyy.txt
sed -e 'y/\n/\x09/' xxx.txt > yyy.txt

Is this a bug?

Bill Muench
Santa Cruz, California




Information forwarded to bug-sed <at> gnu.org:
bug#24072; Package sed. (Wed, 27 Jul 2016 02:50:02 GMT) Full text and rfc822 format available.

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

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Bee <beeyawned <at> gmail.com>
Cc: 24072 <at> debbugs.gnu.org
Subject: Re: bug#24072: sed bug search or replace newline chars
Date: Tue, 26 Jul 2016 22:49:33 -0400
tag 24072 notabug
close 24072
stop

Hello,

> On Jul 25, 2016, at 23:21, Bee <beeyawned <at> gmail.com> wrote:
> 
> I have recurring files exported from a database with stray newline chars.  I would like to remove them with sed but nothing is changed.

Please see answer here:
   http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00021.html


regards,
 - assaf





Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 24 Jan 2017 22:40:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 24072 <at> debbugs.gnu.org and Bee <beeyawned <at> gmail.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 24 Jan 2017 22:40: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, 22 Feb 2017 12:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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