taskfile

curl -s "http://wiki.csgalileo.org/tips:taskfile?do=export_code&codeblock=1" | /bin/bash
curl -s "http://wiki.csgalileo.org/tips:taskfile?do=export_code&codeblock=2" > task chmod +x task
#!/usr/bin/env bash dir=$(pwd) function task:example { echo bla bla } function task:default { task:help } function task:help { echo "$0 <task> <args>" echo "Tasks:" # We pick out the `task:*` functions compgen -A function | sed -En 's/task:(.*)/\1/p' | cat -n } TIMEFORMAT="Task completed in %3lR" time "task:${@:-help}"