Let's say I have a file (called e) with this content:
a=3 b="5 6"
How can I get each one to be interpreted as a separate argument to env? That is, to have it equivalent to:
$ env a=3 b="5 6" ruby -e 'p ENV["a"]; p ENV["b"]' "3" "5 6" $ env a=3 "b=5 6" ruby -e 'p ENV["a"]; p ENV["b"]' "3" "5 6" This one obviously doesn't work because of the space:
env $(cat e) ruby -e 'p ENV["a"]; p ENV["b"]' But neither does this one:
IFS=$'\n' env $(cat e) ruby -e 'p ENV["a"]; p ENV["b"]' And quoting $(cat e) will result in:
"1\nb=2 3" nil