[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30535: Output buffer overwritten when CR in file
From: |
Wayne Gemmell |
Subject: |
bug#30535: Output buffer overwritten when CR in file |
Date: |
Tue, 20 Feb 2018 07:34:07 +0000 |
Hi Paul
That is exactly what I am getting. It is probably acting quite correctly,
the problem is that the shell executing those control characters is both
confusing and a possible security risk. I've tried this in ksh, dash, bash
and zsh and they all execute the control characters.
I think that they should be suppressed or escaped by default and a flag
should be provided to allow them to be passed out unescaped. Maybe this has
become a feature request...
On Mon, 19 Feb 2018 at 22:13 Paul Eggert <address@hidden> wrote:
> Wayne Gemmell wrote:
> > I would expect the CR to be output verbatim
>
> It is output verbatim, just as you expect. For example:
>
> $ printf 'messag1\rlogin\rmask' >test.log
> 503-day $ grep --color=never login test.log | od -c
> 0000000 m e s s a g 1 \r l o g i n \r m a
> 0000020 s k \n
> 0000023
>
--
Regards
Wayne