your_script_or_function_using_dd_opts arg1=val1 arg2=’7*(%78^^)’ first_non_option_argument arg3=”this won’t set a value"
arg1=val1
will set DD_OPT_arg1=val1
etc. in a completely safe manner.
to achieve this:
source dd_opts.bash
eval “$DD_OPTS_PARSE”
#eval “$DD_OPTS_PARSE_LOCAL”
#^ if you’re inside a function and don’t want different functions using DD_OPTS to clash
Read dd_opts_spec.bash
for examles or run it to ensure the examples work.
http://unix.stackexchange.com/questions/207585/dd-style-parameters-to-a-bash-script