2019-01-15 18:19:51 +01:00
|
|
|
# ksh
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
> Korn Shell, a Bash-compatible command-line interpreter.
|
2025-03-28 05:26:23 +02:00
|
|
|
> See also: `!`, `^`.
|
|
|
|
> More information: <https://manned.org/ksh>.
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
- Start an interactive shell session:
|
2019-01-15 18:19:51 +01:00
|
|
|
|
|
|
|
`ksh`
|
|
|
|
|
2023-01-08 01:24:57 +10:00
|
|
|
- Execute specific [c]ommands:
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2023-01-08 01:24:57 +10:00
|
|
|
`ksh -c "{{echo 'ksh is executed'}}"`
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2023-01-08 01:24:57 +10:00
|
|
|
- Execute a specific script:
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`ksh {{path/to/script.ksh}}`
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2023-01-08 01:24:57 +10:00
|
|
|
- Check a specific script for syntax errors without executing it:
|
|
|
|
|
|
|
|
`ksh -n {{path/to/script.ksh}}`
|
|
|
|
|
|
|
|
- Execute a specific script, printing each command in the script before executing it:
|
2019-01-15 18:19:51 +01:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`ksh -x {{path/to/script.ksh}}`
|