remutils

mkx

Make new executable shell script file from template.

2022 Rémino Rem https://remino.net/


Installation

Homebrew

brew install remino/remino/mkx
mkx

Download

Go to the GitHub download page for the latest release, and download the source code from there.

Git clone

git clone git@github.com:remino/remutils.git
cd remutils/mkx
./mkx

Usage

Run man mkx or mkx -h to see how to use it.

Pipe a command into mkx to save it as an executable script. mkx adds its default shebang unless the input already starts with one.

echo 'echo hello' | mkx output-hello

Use -f to replace an existing file when piping standard input.

Formerly mksh

As the name mksh is more commonly associated with the MirBSD Korn Shell, this repo has been renamed from mksh to mkx. The same goes for the namesake script within.

Invoking mksh with mkx used to be the equivalent of mksh -b or mksh -i <interpreter>. But the with this name change, mkx was now made to work like mksh.