[2289] in Athena Bugs

home help back first fref pref prev next nref lref last post

tail usage message

daemon@ATHENA.MIT.EDU (David Krikorian)
Fri May 26 02:31:48 1989

Date: Fri, 26 May 89 02:31:32 EDT
From: David Krikorian <dkk@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Reply-To: dkk@ATHENA.MIT.EDU

The tail program gives this usage message:

  dkk) tail -safdg
  usage: tail [_[n][lbc][rf]] [file]
  dkk) tail -safdg |& od -c
  0000000    u   s   a   g   e   :       t   a   i   l       [   +  \b   _
  0000020    [   n   ]   [   l   b   c   ]   [   r   f   ]   ]       [   f
  0000040    i   l   e   ]  \n
  0000045
  dkk)

Note the underscore after the first left bracket in the usage message.
The string that follows is a '+' followed by a backspace, then an
underscore.  This combination was intended to produce a plus sign
directly over a minus sign.  As you can see above, it doesn't.  I get
the correct string printed when I type either of the following two
commands:
	man tail
	more /paris/source/4.3/ucb/tail.c

Tail is using fprintf to output the string.  I guess "more" isn't.
Typing set_edit_char at the shell (logged in as testuser on a 6.0R
machine) shows:
	C-H: delete_backward

I presume that's where fprintf is getting it's ^H interpreted as a
delete, while "more" is getting around it.

Perhaps the fprintf should use "\b" rather than '^H' for backspace?


home help back first fref pref prev next nref lref last post