Open arapelle opened 1 year ago
getopts already breaks if --
is encountered. It is not needed for commandf.
while getopts "a:b:" option
do
case "${option}" in
a)
echo "A: ${OPTARG}"
;;
b)
echo "B: ${OPTARG}"
;;
*)
echo "Whut Oo ${option}"
;;
esac
done
shift $((OPTIND-1))
echofmt "{blue}remaining"
exit 0
Option
--
breaks the getopts | getopt loop.Call example:
commandf -v var PARAM [--] echo "message"
Options:
-n:
: no output-v:
: output to variable-f:
: output to file-i
: output if fails-t
: calltime $*
?? if we split
out
anderr
. (?? in another task?) https://stackoverflow.com/questions/11027679/capture-stdout-and-stderr-into-different-variables--no-out
--no-err
--outs-var
--outs-file
--out-var
--err-var
--out-file
--err-file
https://stackoverflow.com/questions/2493642/how-can-a-linux-unix-bash-script-get-its-own-pid