An alternative to what you’re doing:
if [[ $* == *--flag* ]]
See also BashFAQ/035.
Note: This will also match
--flags-offsince it’s a simple substring check.
An alternative to what you’re doing:
if [[ $* == *--flag* ]]
See also BashFAQ/035.
Note: This will also match
--flags-offsince it’s a simple substring check.