[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command "tail" printing of '\b' and '\t' Characters
From: |
Bob Proulx |
Subject: |
Re: Command "tail" printing of '\b' and '\t' Characters |
Date: |
Wed, 5 Sep 2001 18:42:41 -0600 |
Kevin
> A program that reproduces the problem follows these directions.
> Copy the source to a file called tail.c.
You are writing to the syslog daemon. It turns out there is a command
line program to do that called 'logger' which can make this a little
easier to demonstrate. But I digress.
> tail -f /var/log/messages
[...]
> Sep 5 13:51:05 mrx kernel: ^IThe back space and tab characters show up as:
> Sep 5 13:51:05 mrx kernel: ^I^I- backspace -> ^H
> Sep 5 13:51:05 mrx kernel: ^I^I- tab -> ^I
> Sep 5 13:51:16 mrx kernel: tail.c^H^H::cleanup_module() line 34
This is not a bug in tail. Nor do I think this is a bug in syslog
either. It is just the way syslog operates. It is translating
nonprintable characters into printable characters.
The syslogd/logger functionality is cleaning those up and the actual
values in the messages file are printable. Tail is doing nothing to
them. If you edit the /var/log/messages file with an editor you
should be able to verify for yourself that the strings were cleaned up
before tail read them.
Bob