Description #
Pdksh is a free implementation of the Korn shell, providing compatibility with the original ksh while offering enhancements and portability across Unix-like systems.
History #
Developed in the early 1990s to provide a freely available Korn shell, pdksh became widely used before being succeeded by forks like mksh. It aimed to replace proprietary shells with an open-source alternative.
Hello World Code #
echo "Hello, World!"
How to Run #
Option 1: Online
(No dedicated online runners, but shellcheck.net supports syntax checking)
Option 2: Local
Install with:
sudo apt-get install pdksh
pdksh
Run script:
pdksh script.sh
Key Concepts #
- Compatible with ksh88 and ksh93
- Public domain licensing
- POSIX compliance
- Supports command history and job control
- Used as default shell on some BSD systems historically
- Supports aliases, functions, and built-in arithmetic
- Supports scripting with Korn shell features
- Lightweight and portable
- Suitable for scripting and interactive use
- Basis for other Korn shell forks like mksh
Try It Online #
ShellCheck (syntax checking)
Fun Facts #
- Pdksh was instrumental in popularizing free Korn shell implementations.
- It served as the basis for mksh and other shells that continue development.
- Despite being less maintained now, it influenced many open-source shells.
- Pdksh provided a legal alternative when original ksh was proprietary.
- It helped standardize Korn shell scripting on BSD and Linux systems.