[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33774: glitch in cat
From: |
Bernhard Voelker |
Subject: |
bug#33774: glitch in cat |
Date: |
Wed, 19 Dec 2018 14:01:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 |
tags 33774 notabug
close 33774
stop
On 12/16/18 8:58 PM, Valentin Schild wrote:
> somehow, when using cat to display a file's content, I get output to
> the command line
> The file to output contains
> ^[Z
> like attached file "catbug".
>
> In terminal I type
> cat catbug
That's the point: the terminal treats some control characters specially,
and therefore does not display them.
Your file contains 3 bytes:
- octal 33,
- a 'Z', and
- octal 12 (=newline):
od -to1z catbug
0000000 033 132 012 >.Z.<
0000003
And cat(1) is exactly writing that to the terminal:
$ strace -ve write cat catbug
write(1, "\33Z\n", 3) = 3
+++ exited with 0 +++
As there seems nothing to be wrong in 'cat', I'm marking this as not a bug
in our bug tracker. Of course, discussion on this may continue, and we may
even re-open this issue if needed.
Have a nice day,
Berny