Here's the minimal example:
echo "{\"foo\": \"John\",\"bar\":\"Smith\"}" | jq -r '@sh "export FOO=\(.foo)\nexport BAR=\(.bar) \n"'
And in my real life scenario case that jq selector is really long (think about 10 exports), how can I break them into multiple lines or something? I tried using \ as a separator at the end of the lines but it doesn't work unfortunately.