The following is a simple Bash command line:
grep -li \'regex\' \"filename with spaces\" \"filename\"
No problems. Also the following works
Try this:
(IFS=$'\n'; grep -li 'regex' $(
IFS is the Internal Field Separator. Setting it to $'\n' tells Bash to use the newline character to delimit filenames. Its default value is $' \t\n' and can be printed using cat -etv <<<"$IFS".
Enclosing the script in parenthesis starts a subshell so that only commands within the parenthesis are affected by the custom IFS value.