If you use double quotes "${LCOV_INPUT_FILES}"
, bash treats the whole string as one word. Without double quotest, bash would split the variable's value on whitespace.
For the way you constructed the string the only option is to use eval
:
eval lcov "$LCOV_INPUT_FILES" -o ...
There are other options, too. You can use an array to store the parameters
LCOV_INPUT_FILES+=(-a "$FILENAME")
and then just expand the array in double quotes:
lcov "${LCOV_INPUT_FILES[@]}" -o ...