unix - How do I set variables from verbatim shell output? -
i thought should simple, i'm trying can't figure out. did take stupid pills morning?
i have command output variables want set. thought use eval, apparently doesn't work.
here's want do:
$ ./foo foo=bar bar=baz $ eval ./foo $ echo $foo bar how set directly?
you need evaluate output of script, not string ./foo
$ eval $( ./foo )
Comments
Post a Comment