[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24072: sed bug search or replace newline chars
From: |
Bee |
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
- bug#24072: sed bug search or replace newline chars,
Bee <=