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
    OfficeFloor
    OfficeFloor
    OfficeFloor provides inversion of
    coupling control, with its: - dependency
    injection - continuation injection -
    thread injection For more information
    visit the...
    Download OfficeFloor
  • 2
    DivKit
    DivKit
    DivKit is an open source Server-Driven
    UI (SDUI) framework. It allows you to
    roll out server-sourced updates to
    different app versions. Also, it can be
    used fo...
    Download DivKit
  • 3
    subconverter
    subconverter
    Utility to convert between various
    subscription format. Shadowrocket users
    should use ss, ssr or v2ray as target.
    You can add &remark= to
    Telegram-liked HT...
    Download subconverter
  • 4
    SWASH
    SWASH
    SWASH is a general-purpose numerical
    tool for simulating unsteady,
    non-hydrostatic, free-surface,
    rotational flow and transport phenomena
    in coastal waters as ...
    Download SWASH
  • 5
    VBA-M (Archived - Now on Github)
    VBA-M (Archived - Now on Github)
    Project has moved to
    https://github.com/visualboyadvance-m/visualboyadvance-m
    Features:Cheat creationsave statesmulti
    system, supports gba, gbc, gb, sgb,
    sgb2Tu...
    Download VBA-M (Archived - Now on Github)
  • 6
    Stacer
    Stacer
    Linux System Optimizer and Monitoring
    Github Repository:
    https://github.com/oguzhaninan/Stacer.
    Audience: End Users/Desktop. User
    interface: Qt. Programming La...
    Download Stacer
  • More »

Linux commands

Ad