<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On Sun, 11 Aug 2019 17:47:17 +0000 Dmitry Bogatov <kaction@debian.org>
wrote:<br>
<jsmith@resonatingmedia.com><br>
> > I'd like to point out though that with such an option
enabled, it is<br>
> > going to result in some weird output. If all escape
sequences are<br>
> > printed to the file, tools like "less" can handle it,
but other (more<br>
> > raw) text manipulation tools such as "head" and "tail"
will end up<br>
> > mangling the lines.<br>
> <br>
> No. When you output raw escape sequences on terminal, they
will be<br>
> interpreted by terminal, so `head', `tail' and `grep'
output will be<br>
readable and colored. Pager `less' with -R option also interpret
escape<br>
symbols.<br>
<br>
I wasn't speaking theoretically. I tried it and the "head",
"cat" and "tail" commands mangle the lines of the log file when
escape sequences are not escaped. Output from "less" is clean
though and looks correct.<br>
<br>
> Looks like your terminal interpret '\r' incorrectly. <br>
<br>
What makes you think that? The lines look exactly as I would
expect them to look.<br>
<br>
> What does following command print on your terminal?<br>
<br>
> $ bash -c "printf 'foo\rbar'"<br>
<br>
It prints "bar", just as it should.<br>
<br>
</jsmith@resonatingmedia.com></kaction@debian.org>
</body>
</html>