Runner for sh.kts scripts
To learn more about Kotlin Shell check here
To run kshell you need kotlin-shell-core and kotlin-shell-kts as well as kotlinc installed.
Packages with libraries can be found in this repository releases.
Kotlin Shell scripts have .sh.kts extension
To run type:
kshell SCRIPT.sh.kts ARGSexample:
kshell hello.sh.ktskshell greeting.sh.kts JohnAdd kshell to PATH and #!/usr/bin/env kshell at the begining of a script file to be able to use it as executable.
example: hello.sh.kts
#!/usr/bin/env kshell
shell { "echo hello world!"() } $ export PATH=$PATH:path/to/kshell
$ chmod +x hello.sh.kts
$ ./hello.sh.kts
hello