On Mon, 2008-06-09 at 14:29 -0400, David Korn wrote:
> Subject: Re: [ast-users] typeset differences between ksh88 and ksh93
> --------
>
> > Under ksh88 (AIX 5.2) I can use typeset -xZ4 VAR or typeset -Zx4 VAR and
> > get the same results, however under ksh93 I cannot. I am trying to help
> > someone port shell scripts written for ksh88 under AIX to work in ksh93
> > in SLES Linux. Is there a way to enable an older backward compatible
> > behavior in ksh93 to make it accept typeset options in the way it did in
> > ksh88?
> >
> > [EMAIL PROTECTED]:/usr/bin $ uname -a
> > AIX hostname 2 5 000198B4D000
> > [EMAIL PROTECTED]:/usr/bin $ Version M-11/16/88f
> > [EMAIL PROTECTED]:/usr/bin $ FOO="5"
> > [EMAIL PROTECTED]:/usr/bin $ typeset -xZ4 FOO
> > [EMAIL PROTECTED]:/usr/bin $ echo ${FOO}
> > 0005
> > [EMAIL PROTECTED]:/usr/bin $ BAR="3"
> > [EMAIL PROTECTED]:/usr/bin $ typeset -Zx4 BAR
> > [EMAIL PROTECTED]:/usr/bin $ echo ${BAR}
> > 0003
> >
> > [EMAIL PROTECTED]:/usr/bin $ ksh93
> > [EMAIL PROTECTED]:/usr/bin $ LOL="6"
> > [EMAIL PROTECTED]:/usr/bin $ typeset -xZ4 LOL
> > [EMAIL PROTECTED]:/usr/bin $ echo ${LOL}
> > 0006
> > [EMAIL PROTECTED]:/usr/bin $ CATS="6"
> > [EMAIL PROTECTED]:/usr/bin $ typeset -Zx4 CATS
> > [EMAIL PROTECTED]:/usr/bin $ echo ${CATS}
> >
> > 04/
> >
> >
> > virthost3:~ # uname -a
> > Linux virthost3 2.6.16.60-0.21-xen #1 SMP Tue May 6 12:41:02 UTC 2008
> > x86_64 x86_64 x86_64 GNU/Linux
> > virthost3:~ # ksh
> > virthost3:/root # echo ${.sh.version}
> > Version M 93s+ 2008-01-31
> > virthost3:/root # LOL="6"
> > virthost3:/root # typeset -xZ4 LOL
> > virthost3:/root # echo ${LOL}
> > 0006
> > virthost3:/root # CATS="6"
> > virthost3:/root # typeset -Zx4 CATS
> > Usage: typeset [-abflnprstuxAH] [-i[base]] [-E[n]] [-F[n]] [-L[n]]
> > [-R[n]]
> > [-T tname] [-Z[n]] [name[=value]...]
> > Or: typeset [ options ] -f [name...]
> >
> >
> > -
> > Jared H. Hudson
> > Dedicated Support Engineer
> > [EMAIL PROTECTED]
> > 479-283-4677
> >
>
>
> There is a list of compatibility issued when moving from ksh88
> to ksh93, and this one is listed as follows:
>
> 11. Some undocumented combinations of argument passing to ksh
> builtins no longer works since ksh-93 is getopts conforming
> with respect to its built-ins. For example, typeset -8i
> previously would work as a synonym for typeset -i8.
>
> The reason for the change was to be getopts standard as much as possible
> and to avoid ambiguities.
>
> No I could add a warning message that would be displayed with
> ksh -n that would warn about problems such as this. If you were to run
> ksh -n your_script
> it would tell you what lines use invalid options to typeset. Would
> that be of help?
Yes, it would help. Thanks a lot.
--
Jared H. Hudson
Dedicated Support Engineer
[EMAIL PROTECTED]
479-283-4677
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users