EnglishFrenchSpanish

OnWorks favicon

lksh - Online in the Cloud

Run lksh in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command lksh that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


lksh — Legacy Korn shell built on mksh

SYNOPSIS


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

DESCRIPTION


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
recommended to port scripts to mksh instead of relying on legacy or idiotic POSIX-mandated
behaviour, since the MirBSD Korn Shell scripting language is much more consistent.

Note that it's strongly recommended to invoke lksh with at least the -o posix option, if not
both that and -o sh, to fully enjoy better compatibility to the POSIX standard (which is
probably why you use lksh over mksh in the first place) or legacy scripts, respectively.

LEGACY MODE


lksh currently has the following differences from mksh:

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

· The KSH_VERSION string identifies lksh as “LEGACY KSH” instead of “MIRBSD KSH”. Note
that the rest of the version string is identical between the two shell flavours, and the
behaviour and differences can change between versions; see the accompanying manual page
mksh(1) for the versions this document applies to.

· 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; this means that...

$ echo $((2147483647 + 1))

... is permitted to, e.g. delete all files on your system (the figure differs for
non-32-bit systems, the rule doesn't). The sign of the result of a modulo operation
with at least one negative operand 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 (see above for an example).

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

· The rotation arithmetic operators are not available.

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

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

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

· 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.

· Unlike AT&T UNIX ksh, mksh in -o posix or -o sh mode and lksh do not keep file
descriptors > 2 private from sub-processes.

· Functions defined with the function reserved word share the shell options (set -o)
instead of locally scoping them.

Use lksh online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 2
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • 3
    SuiteCRM
    SuiteCRM
    SuiteCRM is the award-winning Customer
    Relationship Management (CRM)
    application brought to you by authors
    and maintainers, SalesAgility. It is the
    world�s mos...
    Download SuiteCRM
  • 4
    Poweradmin
    Poweradmin
    Poweradmin is a web-based DNS
    administration tool for PowerDNS server.
    The interface has full support for most
    of the features of PowerDNS. It has full
    support...
    Download Poweradmin
  • 5
    Gin Web Framework
    Gin Web Framework
    Gin is an incredibly fast web framework
    written in Golang that can perform up to
    40 times faster, thanks to its
    martini-like API and custom version of
    httprout...
    Download Gin Web Framework
  • 6
    CEREUS LINUX
    CEREUS LINUX
    CEREUS LINUX basado en MX LINUX con
    varios entornos de escritorios. This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/cereu...
    Download CEREUS LINUX
  • More »

Linux commands

  • 1
    aa-clickquery
    aa-clickquery
    aa-clickquery - program for querying
    click-apparmor DESCRIPTION: This program
    is used to query click-apparmor for
    information. USAGE: aa-clickquery
    --click-fra...
    Run aa-clickquery
  • 2
    aa-exec-click
    aa-exec-click
    aa-exec-click - program for executing
    click packages under confinement
    DESCRIPTION: This program is used to
    execute click package under AppArmor
    confinement. I...
    Run aa-exec-click
  • 3
    cpio
    cpio
    cpio - copy files to and from archives ...
    Run cpio
  • 4
    cpipe
    cpipe
    cpipe - copy stdin to stdout while
    counting bytes and reporting progress ...
    Run cpipe
  • 5
    FvwmSave
    FvwmSave
    FvwmSave - the Fvwm desktop-layout
    saving module ...
    Run FvwmSave
  • 6
    FvwmSave1
    FvwmSave1
    FvwmSave - the FVWM desktop-layout
    saving module ...
    Run FvwmSave1
  • More »

Ad