Unix/Linux Go Back    

CentOS 7.0 - man page for lksh (centos section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

LKSH(1) 			   BSD General Commands Manual				  LKSH(1)

     lksh -- Legacy Korn shell built on mksh

     lksh [-+abCefhiklmnprUuvXx] [-+o opt] [-c string | -s | file [args ...]]

     lksh is a command interpreter intended exclusively for running legacy shell scripts.  It is
     built on mksh; refer to its manual page for details on the scripting language.  It is recom-
     mended to port scripts to mksh instead of relying on legacy or idiotic POSIX-mandated behav-
     iour, since the MirBSD Korn Shell scripting language is much more consistent.

     lksh has the following differences from mksh:

     o	 lksh is not suitable for use as /bin/sh.

     o	 There is no explicit support for interactive use, nor any command line editing or his-
	 tory code.  Hence, lksh is not suitable as a user's login shell, either; use mksh

     o	 The KSH_VERSION string identifies lksh as ``LEGACY KSH'' instead of ``MIRBSD KSH''.

     o	 lksh only offers the traditional ten file descriptors to scripts.

     o	 lksh uses POSIX arithmetics, which has quite a few implications: The data type for
	 arithmetics is the host ISO C long data type.	Signed integer wraparound is Undefined
	 Behaviour.  The sign of the result of a modulo operation with at least one negative op-
	 erand is unspecified.	Shift operations on negative numbers are unspecified.  Division
	 of the largest negative number by -1 is Undefined Behaviour.  The compiler is permitted
	 to delete all data and crash the system if Undefined Behaviour occurs.

     o	 The rotation arithmetic operators are not available.

     o	 The shift arithmetic operators take all bits of the second operand into account; if they
	 exceed permitted precision, the result is unspecified.

     o	 The GNU bash extension &> to redirect stdout and stderr in one go is not parsed.

     o	 The mksh command line option -T is not available.

     o	 Unless set -o posix is active, lksh always uses traditional mode for constructs like:

	       $ set -- $(getopt ab:c "$@")
	       $ echo $?

	 POSIX mandates this to show 0, but traditional mode passes through the errorlevel from
	 the getopt(1) command.

     o	 lksh, unlike AT&T UNIX ksh, does not keep file descriptors > 2 private.




     lksh tries to make a cross between a legacy bourne/posix compatibl-ish shell and a legacy
     pdksh-alike but ``legacy'' is not exactly specified.

     The set built-in command does not have all options one would expect from a full-blown mksh
     or pdksh.

     Talk to the MirOS development team using the mailing list at <miros-mksh@mirbsd.org> or the
     #!/bin/mksh (or #ksh) IRC channel at irc.freenode.net (Port 6697 SSL, 6667 unencrypted) if
     you need any further quirks or assistance, and consider migrating your legacy scripts to
     work with mksh instead of requiring lksh.

MirBSD					   May 2, 2013					   MirBSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 08:59 AM.