Roland Mainz's sponsored putback of: PSARC/2009/063 ksh93 update 2 PSARC/2009/248 ksh93 update to 2009-03-10 PSARC/2009/249 more ksh93 command conversions will affect two projects: 1. ksh93-integration project: ############################ - ksh93 is updated to ast-ksh.2009-10-14 (a Changelog for ksh93/libshell can be found at usr/src/lib/libshell/common/RELEASE)
- The following additional builtin commands are now enabled by default and bound to /usr/bin/ /usr/bin/cksum /usr/bin/cmp /usr/bin/comm /usr/bin/cut /usr/bin/join /usr/bin/paste /usr/bin/tail - Usability: - The machine-wide ksh interactive shell startup file /etc/ksh.kshrc will now enable the "globstar" mode by default The "globstar" mode (enabled via $ set -o globstar #) causes ** by itself to also match all sub-directories during pathname expansion. - The new type system is now considered stable (but not fully ARC'ed yet), the documentation can be found in /usr/share/doc/ksh/TYPES - The ksh93 documenation now lives in /usr/share/doc/ksh/ - Demo code/"Easter-eggs": - ksh93 now contains an experimental version of "grep" which comes in several flavours and should form the basis for a future version of POSIX/SUS "grep" (matching /usr/xpg4/bin/grep&co.) with common GNU+BSD features (including "-r"). - "grep" The default basic regular expressions (no alternations.) - "egrep" Extended regular expressions (alternations, one or more.) - "fgrep" Fixed string expressions. - "pgrep" perl(1) regular expressions (lenient extended.) - "xgrep" Augmented regular expressions (conjunction, negation.) The builtin can be accessed like this: $ builtin grep ; grep --help # enables the "grep" builtin and displays the builtin help 2. POSIX utility modernisation: ############################### As part of the POSIX utilty modernisation project the following utilities are switched from the old Solaris codebase to the AST&T AST (=Advanced Software Technology) codebase: /usr/bin/cksum /usr/bin/cmp /usr/bin/comm /usr/bin/cut /usr/bin/join /usr/bin/paste /usr/bin/print /usr/bin/tee /usr/bin/uniq /usr/bin/wc Notes: - The new versions of these utilities have common GNU+BSD features, see PSARC/2009/063 and PSARC/2009/249 - Each utility supports the --help and --man option which can be used to obtain a short description of the additional features - The implementation of /usr/bin/cksum will take the specified output format string "%u %d %s\n" <checksum>, <# of octets>, <path name> now literally, previously implementation used a <tab> instead of <space> between %u and %d (the POSIX standard allows both <tab> and <space>, however GNU and BSD implementations use <space> and no other implementation except Solaris was found which uses <tab>). This is not considered an issue of backwards-compatibilty since the POSIX people invented "cksum" as portable hash sum generator and any non-standard behaviour defeats the purpose of this utility (this was explcitly described in PSARC/2009/249). For futher information see http://www.opengroup.org/onlinepubs/009695399/utilities/cksum.html - Design: - The code for the utilities is shared between ksh93 and the utilities and lives in libcmd.so.1 to reduce disk footprint. - The source code for the utilities can be found under usr/src/lib/libcmd/common/, the entry point can be found at usr/src/cmd/ksh/builtins/alias.c. This follows the design of "busybox" in where one executable contains many different utilities where the physical files in /usr/bin/ are hard-links to the busybox executable (we call it "alias" in our implementation). Reporting bugs/problems/rants ############################# If you encounter any difficulties which you believe may be related to this putback, please direct all rants/flames in Roland's (roland.mainz at nrubsig.org) or Olga's (olga.kryzhanovska at gmail.com) direction, the ksh93-integration mailinglist (see http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss ; please subscribe before posting), or http://bugs.opensolaris.org/ (Product/Category/Subcategory "solaris/shell/korn93"). Links ##### - Project homepage: http://www.opensolaris.org/os/project/ksh93-integration/ - Project home page can be found at http://www.opensolaris.org/os/project/ksh93-integration/ - KornShell home page: http://www.kornshell.com/ - AT&T ast-ksh source packages: http://www.research.att.com/~gsf/cgi-bin/download.cgi?action=list&name=ast-ksh - shell project shell script coding guidelines: http://www.opensolaris.org/os/project/shell/shellstyle/