I am writing a shell wrapper for a program. The wrapper will pass command line options to the program. Also it would supply (some) options if not specified.
Question is: how do I check if an option, say -j, is (not) in the argument list?
IF bash like python, I can do
if '-j' in $@; then
my_prog "$@"
else
my_prog "$@" -j 10
fi
obvious it is not.
How do I do it in bash, safely and elegantly ?
Thanks!