Re: Replace 0d with a space

"Daniel Goldman [email protected] [sed-users]" <[email protected]> Thu, 21 Jul 2016 11:31:19 -0700
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Is it a DOS or UNIX file? It might help to know more detail about 
exactly what you are trying to accomplish.

https://blog.codinghorror.com/the-great-newline-schism/ is an article 
that gives a pretty decent explanation about 0X0A and 0X0D (octal 15). 
It sounds like you already understand about DOS and UNIX newline 
conventions?

Anyway, to replace 0X0D with space, using GNU tr or GNU sed, I think the 
answer is similar to the other response:

tr "\015" " " (zero)
--- OR ---
sed "s/\o15/ /g" ("little o")

$ echo -e ":\015:" | od -cx # input with 0X0D (octal 15)
0000000   :  \r   :  \n
            0d3a    0a3a
0000004

$ echo -e ":\015:" | tr "\015" " " | od -cx
0000000   :       :  \n
            203a    0a3a
0000004

$ echo -e ":\015:" | sed -r "s/\o15/ /g" | od -cx
0000000   :       :  \n
            203a    0a3a
0000004

Daniel

On 7/21/2016 5:22 AM, 'Jennings, Kathryn' [email protected] 
[sed-users] wrote:
> Hello,
>
>
> I have been trying to remove all 0d characters within a document with a space.  I can delete the 0d using    tr -d '\n'
> I cannot find anything that will help me replace it.  I am thinking that sed is the correct command to use, but am unsure how to code the 0d character.
>
>
>
>
> Thanks & Regards,
>
>
> Kathryn Jennings
> Electronic Commerce COE
>
>
> Allstate Insurance
> 8711 N. Freeport Parkway, MS 4
> Irving, TX  75063
>
>
> Phone 972-915-5384
> Fax 972-915-5483
> [email protected]<mailto:[email protected]>
>
>
> The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> ------------------------------------
> Posted by: "Jennings, Kathryn" <[email protected]>
> ------------------------------------
>