bug-textutils
[Top][All Lists]
Advanced

[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: Tue, 4 Sep 2001 18:06:13 -0600

Kevin

> Kevin R Frank <address@hidden> on 09/04/2001 03:12:38 PM
> Please respond to Kevin R Frank/Raleigh/address@hidden

Unlikely that anyone outside of IBM would be able to use that
address.  :-)

> When using the command tail <file> on a file that contain the ASCII
> characters '\b' (i.e backspace) or '\t' (tab), we get the following
> characters printed to the terminal rather than the expected characters:
> 
>         '\b' --> ^H
>         '\t' --> ^I
> 
> The output tty is formated incorrectly because these characters are
> not expanded correctly.

Thanks for the report.  But in the future could you provide the
version number of the program such as provided by the 'tail --version'
output and also the smallest possible test case to recreate the
problem.  There is not yet enough information to determine what is
happening for you and so we can only guess.

Since backspace is a control-H and tab is a control-I there is a
relationship there.  But it does not make sense that you would see
them on your screen.  Your terminal should be tracking those
characters and operating on them.  You can see the output I see.

Try this experiment:

  echo 'abc'
  abc
  echo 'abc\b\bdef'
  adef
  echo 'abc\b\bdef' | tail
  adef
  echo 'abc\b\bdef' | cat
  adef

I cannot recreate your problem using tail.  I can forcibly print
non-printing characters.

  echo 'abc\b\bdef' | cat -v
  abc^H^Hdef

The cat -v'isible option shows that those control characters are
there.  The tail command does do character mapping.  Perhaps you are
seeing the output inside of a less/more pager or inside of an emacs
shell terminal or perhaps in some other way that displays nonprinting
characters in a mapped to visible manor?

Bob Proulx



reply via email to

[Prev in Thread] Current Thread [Next in Thread]