[ksh93-integration-discuss] uname -i

Glenn Fowler gsf at research.att.com
Sun Mar 30 09:10:54 PDT 2008


thanks for this report

its a default (and obscure) feature of the -last optget()
that breaks the principle of least surprise
(at its worst when it surprises the author)

the next update will have a better default, and your example will work

at issue is a feature that redirects { -number +number } operands
to the first numeric option, e.g., to support the tail(1) shorthands

	-2 => -n 2
	+2 => -n +2

On Fri, 28 Mar 2008 18:36:45 PDT Richard L. Hamilton wrote:
> P.S. another quirk with the builtins:  part of a line in my .kshrc looks like

> date '+3600*%H+60*%M+%S'

> It works with /usr/bin/date, but with the builtin date I get all sorts
> of errors:

> date: +*: unknown option
> date: +%: unknown option
> date: +H: unknown option
> Usage: date [-aceEiLlmnsuz] [-d date] [-f format] [-p format] [-U scale]
>             [ +format | date ... | file ... ]

> (the result was ultimately used to reset SECONDS to count since local midnight so
> that hh:mm:ss could easily be regenerated out of it to incorporate in PS1;
> some devious stuff I found somewhere that works, except for the date builtin
> blowing up on it)



More information about the ksh93-integration-discuss mailing list