\r not escaped in e.g. /proc/mounts
From
Christoph Anton Mitterer@21:1/5 to
All on Thu Oct 7 02:50:01 2021
Hey.
Wanted to ask here, before I make (probably unnecessary noise at
lkml).. O:-)
I just noticed that \r is not escaped in e.g. /proc/mounts (and
possibly similar files that do such escaping).
The output does in fact contain then a \r, so I guess parsing for most
(all?) shell tools should be fine... and this be a non issue.
But on the terminal, things get messed up and not necessarily in a
noticeable way.
Consider e.g.
# mkdir $'a\rb'
# mount -t tmpfs bar $'a\rb'
# grep bar /proc/mounts
b tmpfs rw,relatime,inode64 0 0x/a
(as seen on the terminal)
instead of a mount with $'c\rd':
foo /root/strange-mount-points/c\012d tmpfs rw,relatime,inode64 0 0
Cheers,
Chris.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)