'find command in bash vs find command in cli

I need to accommodate spaces in filepaths. Why does "find" not work from the script, but works from the cli?

MyLaptop$ ./my-bash-script.sh

find: '/Sandbox/test folder/testfiles-good/ResidentFile_1.pcapng': No such file or directory

MyLaptop$ find '/Sandbox/test folder/testfiles-good/ResidentFile_1.pcapng'

/Sandbox/test folder/testfiles-good/ResidentFile_1.pcapng

Using echo find -f "'$line'"

output: find -f '/Sandbox/test folder/testfiles-good/ResidentFile_1.pcapng'

But in this case: FOUND="$(find -f "'$line'")" it does not



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source