bug#30535: Output buffer overwritten when CR in file

2018-02-19 Thread Wayne Gemmell
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

bug#30525: Unexpected matches for input data from a patch file

2018-02-19 Thread SF Markus Elfring
Hello, I have tried the command “`printf -- '-\tif\n'|grep -E '^-\s+[^i]'`” out with the version “3.1-1.4”. I get no match which I expect in this use case. But I wonder why matches are displayed when if lines are passed from a patch file instead. Should unwanted characters be also excluded by

bug#30535: Output buffer overwritten when CR in file

2018-02-19 Thread Wayne Gemmell
Hi I have an issue with files that contain carriage returns. I have log files that contain user input which sometime has carriage returns. The EOL characters are fine so I can't throw mac2unix at the problem. The issue is that when grep outputs the CR it follows the CR to the beginning of the

bug#30535: Output buffer overwritten when CR in file

2018-02-19 Thread Paul Eggert
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 000 m e s s a g 1 \r l o g i n \r m a

bug#30525: Unexpected matches for input data from a patch file

2018-02-19 Thread Paul Eggert
SF Markus Elfring wrote: I have tried the command “`printf -- '-\tif\n'|grep -E '^-\s+[^i]'`” out with the version “3.1-1.4”. I get no match which I expect in this use case. But I wonder why matches are displayed when if lines are passed from a patch file instead. I assume it's because the