0

I am calling two shell scripts in a row. I'd like to get the environment variables at the end of the first one so that I can inject them into the second one as it starts.

I'm fairly sure this isn't possible, but I'd just like to make sure.

static_rtti
  • 53,760
  • 47
  • 136
  • 192
  • I am not use if writing to environment variables is a good thing but if you would like to consider `stdout` then you can checkout [this answer](http://stackoverflow.com/a/13332300/378704). –  May 02 '17 at 16:45
  • @kiran.koduru : I don't have control over the scripts I'm running. They use environment variables, so I have to use that. – static_rtti May 02 '17 at 16:51
  • 1
    I don't think there's a way to do this with just popoen but you could start a wrapper process (say, your own shell script) to call the scripts for you and manage the environment. – pvg May 02 '17 at 16:55
  • @pvg : that's probably what I'll end up doing, but I wanted to be sure it was absolutely necessary. – static_rtti May 02 '17 at 16:58

0 Answers0