Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save slavcodev/4d7d359782b00f49a7904965d152a6fd to your computer and use it in GitHub Desktop.
Save slavcodev/4d7d359782b00f49a7904965d152a6fd to your computer and use it in GitHub Desktop.
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
### -h Show this message.
help() {
sed -rn 's/^### ?//;T;p' "$0"
}
if [[ $# == 0 ]] || [[ "$1" == "-h" ]]; then
help
exit 1
fi
echo Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment