Need help to understand this command

I am a newbie in Ruby, and right now I need to understand a piece of code.

sourceNode.execute(“for f in #{sources.gsub(/ /){’\ '}}; do echo \$f; done”)

Can somebody tell me what that line of code do? Especially with the statement inside the “execute”

Thanks a lot for your help.

can you list the full code as

sourceNode.execute(“for f in #{sources.gsub(/ /){’\ '}}; do echo \$f; done”)

is not that understandable.