Skip to content

Instantly share code, notes, and snippets.

@mhrstmnn
Last active April 13, 2024 12:21
Show Gist options
  • Save mhrstmnn/811b0c75acee5b69bcc0112a3e7a99fd to your computer and use it in GitHub Desktop.
Save mhrstmnn/811b0c75acee5b69bcc0112a3e7a99fd to your computer and use it in GitHub Desktop.
A script to create new scripts
#!/bin/zsh
OUTPUT='#!/bin/zsh\n\n# TODO'
FILENAME='empty_script.sh'
if [ $# -ne 0 ]; then
if [[ "$*" == *.* ]]; then
FILENAME="$*"
else
FILENAME="$*.sh"
fi
fi
echo $OUTPUT > $FILENAME
chmod +x $FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment