tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

old style tail(1) options and bin/57483



bin/57483 reports that tail(1) doesn't correctly handle old style
options in all cases.  The current approach taken by tail is to
massage the command line to convert old style options into the new
style options and then use getopt to parse only the new style.
Unfortunately the code that does the conversion is a bit naive, so it
doesn't notice that in -fn +20 the "+20" is not a standalone old style
option but an argument to the new style -n hidden/fused into "-fn".

I sketched a prototype to parse both new and old style options
together but the comments about incompatibilities with historic
behavior give me pause.  Cf.

  https://anonhg.netbsd.org/src/file/tip/usr.bin/tail/tail.c#l76

The man page seems to be completely silent about the old style
options.

What exactly are we aiming for here?  Do we want to support postfix
options in something like old style +<n>qF ?

-uwe


Home | Main Index | Thread Index | Old Index