2026-05-22 14:53:35 +03:00

18 lines
230 B
Bash
Executable File

#!/bin/sh -eu
if [ ! ${#} -eq 1 ]; then
echo 'mksh takes one argument' 1>&2
exit 1
elif [ -e "${1}" ]; then
echo "${1} already exists" 1>&2
exit 1
fi
echo '#!/bin/sh -eu
' > "${1}"
chmod u+x "${1}"
"${EDITOR}" "${1}"