Gentoo Archives: gentoo-user

From: Joseph <syscon780@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] search and replace "carriage return"
Date: Tue, 04 Feb 2014 00:06:23
Message-Id: 20140204000638.GC6850@syscon7.ed.shawcable.net
In Reply to: Re: [gentoo-user] search and replace "carriage return" by Mike Gilbert
1 On 02/03/14 18:52, Mike Gilbert wrote:
2 >On Mon, Feb 3, 2014 at 6:14 PM, Joseph <syscon780@×××××.com> wrote:
3 >> I have a text file. How do I search and replace "carriage return"?
4 >>
5 >
6 >Do you mean carriage return (decimal 13) or line feed (decimal 10)?
7 >
8 >The former is pretty simple:
9 >
10 >sed -e 's:\r: :g' foo.txt
11
12 I've found this worked for me:
13 cat 16.txt | tr '\n' ' ' > 18.txt
14
15 --
16 Joseph