2 ms·
Arrays are useful for arguments, e.g. FOO_ARGS=( # Some explanatory comment --my-arg 'some value' # More comments some other args #...
by chriswarbo 4y ago
Arrays are useful for arguments, e.g.
FOO_ARGS=(
# Some explanatory comment
--my-arg 'some value'
# More comments
some other args
#...
)
myCondition && FOO_ARGS+=(some conditional args)
foo "${FOO_ARGS[@]}"