ollie/scripts/s/bbg

11 lines
339 B
Bash
Executable File

#!/usr/bin/env bash
# s/bbg: batch background; submit prompt, print session path, return immediately.
for _arg; do
[ "$_arg" = "-help" ] && exec "${0%/*}/b" -help
done
cmd=${0##*/}
if [ $# -eq 0 ] && [ -t 0 ]; then
printf '%s: prompt required: pass as arguments or pipe via stdin\n' "$cmd" >&2; exit 1
fi
exec "${0%/*}/b" -bg "$@"