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.

Full log


View this message in rfc822 format

From: Bee <beeyawned <at> gmail.com>
To: 24072 <at> debbugs.gnu.org
Subject: bug#24072: 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




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

Previous Next


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