Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env sh
- set -eu ${VERBOSE:+-x}
- execute() {
- local cmd="$1"
- shift
- case "$cmd" in
- start) echo a b|exec xargs -P0 -n1 "$0";;
- a) sleep 1; echo a; sleep 2; exec echo a;;
- b) sleep 2; exec echo b "$@";;
- c) execute b foo;;
- *) ! :;;
- esac
- }
- execute "$@"
Add Comment
Please, Sign In to add comment