#!/usr/bin/env bash # hello_bash: sample bash script for the shared interface (SPEC item 6.10). # # Run via daedalus: daedalus hello_bash [name...] # It exists to exercise help() routing, main() dispatch, and the # completion of the help words (SPEC item 3.13.5.2) end to end. # shellcheck source=/dev/null . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/daedalus_common.sh" help() { cat <<'EOF' usage: hello_bash [name...] Prints a hello line, once per name, default "world". EOF } main() { local names=("$@") ((${#names[@]})) || names=("world") local name for name in "${names[@]}"; do echo "hello, ${name} (from daedalus bash)" done } daedalus_bash_dispatch "$@"