ksh
Korn shell, combining features of sh and csh
TLDR
SYNOPSIS
ksh [options] [script] [args...]
DESCRIPTION
ksh is the Korn shell, combining features of the Bourne shell (sh) and C shell (csh). It provides advanced scripting capabilities with interactive command-line editing, command history, job control, and aliases.The shell supports both vi and emacs editing modes, associative and indexed arrays, arithmetic evaluation, coprocesses, and pattern matching. ksh93 is the most widely used version; ksh2020 is a more recent release.
PARAMETERS
SCRIPT
Script file to execute.-c CMD
Execute command string.-l
Login shell (reads profile files).-r
Restricted shell (limits operations like cd and path changes).-s
Read commands from standard input.-o OPTION
Set shell option (e.g., vi, emacs, posix, noclobber, errexit).+o OPTION
Unset shell option.-i
Force interactive shell mode.-n
Read commands but do not execute them (syntax check).-x
Print commands and arguments as they are executed (trace mode).-e
Exit immediately if a command exits with non-zero status.-v
Print shell input lines as they are read.--help
Display help information.
CAVEATS
Multiple implementations exist (ksh88, ksh93, mksh, pdksh). Behavior may differ subtly between implementations and from bash. POSIX compatible when invoked with `-o posix`.
HISTORY
The Korn shell was created by David Korn at Bell Labs in the early 1980s, influencing many modern shells including bash and zsh.
