That was something I suspected.  On my system, I taught it was doing the same 
with 'grep' alone too, but it turned out my default .bashrc setup an alias for 
'bash' to ass '--color=auto'.  I do get the same issue if I type...

$ printf 'line%s\r\n' 1 2 3 | grep .

...because of the alias, buy typing...

$printf 'line%s\r\n' 1 2 3 | /bin/grep .

...does not cause issue.

Indeed, it does not cause an issue in a script, as the text is sent through the 
pipe without color rendering.

So, I was wondering if it was grep or not.

Regards,
Eric

Reply via email to