> X-Original-To: ksh93-integration-discuss at opensolaris.org
> Delivered-To: ksh93-integration-discuss at opensolaris.org
> Date: Mon, 27 Mar 2006 09:58:25 -0500 (EST)
> From: David Korn <dgk at research.att.com>
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> To: ksh93-integration-discuss at opensolaris.org
> Subject: Re: Re: [ksh93-integration-discuss] OpenSolaris /usr/bin/ksh
(builtins)
> X-BeenThere: ksh93-integration-discuss at opensolaris.org
> X-Mailman-Version: 2.1.4
> List-Id: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss.opensolaris.org>
> List-Unsubscribe:
<http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss>,
<mailto:ksh93-integration-discuss-request at
opensolaris.org?subject=unsubscribe>
> List-Archive:
<http://mail.opensolaris.org/pipermail/ksh93-integration-discuss>
> List-Post: <mailto:ksh93-integration-discuss at opensolaris.org>
> List-Help:
<mailto:ksh93-integration-discuss-request at opensolaris.org?subject=help>
> List-Subscribe:
<http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss>,
<mailto:ksh93-integration-discuss-request at opensolaris.org?subject=subscribe>
>
> >
> > >> So besides "sleep", the other ksh93 builtins that are not Solaris ksh
> > >> builtins (and not Solaris binaries) are getconf and printf.
> > >> Are there dependencies on these being ksh93 builtins?
> > >>
> > >> And there are the builtins from libcmd, which are not available
> > >> by default, but seem to be activated via "builtin <command name>"
> > >> although I am able to activate only a subset in ksh93:
> > >>
> > >> basename
> > >> cat
> > >> chmod
> > >> cmp
> > >> cut
> > >> dirname
> > >> head
> > >> logname
> > >> mkdir
> > >> uname
> > >> wc
> > >>
> > >> Would ksh93 users need to have these builtins available?
> > >>
> > >
> > >printf is needed since it contains extensions that are not
> > >in the standard printf that are used in several shell scripts.
> > >
> > >The ones on this list are provided primarily for performance since
> > >builtins are 10 to 100 times as fast.
> >
> > There are, of course, many issues with the compatibility of the
> > builtins and the Solaris versions; e.g., chmod has grown a number
> > of new options relating to ACLs recently.
> >
> > In some cases, perhaps, ksh93 could parse the options and when it
> > decides it doesn't like them fall back to the external command?
> >
> > Their remain cases like "uname -a" which probably doesn't much the
> > builtin.
> >
> > And we can also see whether the standard Solaris utilities should grow
> > additional options to accomodate what ksh93 scripts might expect.
> >
> > Casper
>
> Builtins in ksh93 can be associated with a directory and when this
> happens the builtin is only used when the PATH search finds
> the command in this directory. It would be possible to have a directory
> named /usr/ast/bin which contained the ast versions of these commands
> and only users that have /usr/ast/bin before /bin in their PATH would
> execute these.
Okay, I finally think I understand how this works...
when I initially tried using the builtins for cat, chmod, etc. in ksh93
I did not have /bin on my PATH (only /usr/bin), so /bin/cat was
not the first cat found on the PATH and the builtin cat was not executed.
The builtins bound to /bin in ksh93
(basename, cat, chmod, cmp, cut, dirname, head, logname, mkdir,
uname, & wc) are available by default if the /bin/cat executable, for example,
is first found on PATH (as you stated).
I think you are saying we could bind these executables to /usr/ast/bin
instead of /bin. Is /usr/ast/bin where users might typically install
the AST versions of the executables? Or would this mean that Solaris
should provide the binary versions in /usr/ast/bin?
>
> Another alternative is to extend the ast libcmd versions of these
> commands to contain all the Solaris extensions.
I wonder if this is a better way to do it, if we are considering
replacing Solaris versions with AST versions at some point.
Thanks,
April
>
> David Korn
> dgk at research.att.com
> _______________________________________________
> ksh93-integration-discuss mailing list
> ksh93-integration-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss