Re: Re:[PATCH v2] scripts/decodecode: fix faulting instruction no print when opps.file is DOS format

From: Borislav Petkov
Date: Wed Sep 29 2021 - 05:44:39 EST


On Wed, Sep 29, 2021 at 10:37:07AM +0800, 韦东辉 wrote:
> HI,all Thank you Borislav Petkov for helping me add the CC email
> list. I don't quite understand the meaning of this Google link

https://stackoverflow.com/questions/12167178/replace-windows-newlines-in-a-lot-of-files-using-sed-but-it-doesnt);.

> This means that decodecode does not need to process CR(^M)? Must
> ensure that there is no CR(^M) when inputting log? If so, it will
> increase the cost of learning for others. And I think adding tr -d
> "\\015" will not destroy the beauty of the code, but enhance the
> compatibility of decodecode.

You don't need to use a different tool, tr in this case, to remove the
^M character - sed can do that just fine. And that link has the answer
how, I'll let you figure it out.

Also, please do not top-post when replying but put your reply *under*
the text you're replying to, just like I did.

Thx.

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg