Skip to content

Instantly share code, notes, and snippets.

@neverhoodboy
neverhoodboy / script-template.sh
Created December 17, 2020 16:20 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
Some things every C programmer should know about C
PMK 10-16-2002
Types
-----
Every constant, object, function, and expression in C has a type.
Most generally, a type is either an unqualified type or such a type
qualified with "const", "volatile", or both qualifiers. Unqualified