in reply to Re: set environment for parent process
in thread set environment for parent process

I may be missing the point of your reply (don't know why I made that a may?!) but the shell scripts I'm converting call these 2 scripts then run more code but all of this is in just 1 script. As such this environment doesn't exist until generated by the script at run time. It's not CRON related but job specific. Am I still not so much missing the boat as drowning? Be gentle.......

Ronnie
  • Comment on Re^2: set environment for parent process

Replies are listed 'Best First'.
Re^3: set environment for parent process
by Corion (Patriarch) on Apr 28, 2006 at 16:08 UTC

    You said:

    The problem is that the shell script runs 2 scripts to set up the required environment.

    tilly's snippet does just that - it runs some script and extracts the environment that script sets up. This approach is the only approach under unixish shells by which you can get at whatever environment a script sets up when being sourced. Even though your script is not being run by cron, I think your problem is the same and is solved by tilly's approach.

Re^3: set environment for parent process
by Anonymous Monk on Apr 28, 2006 at 16:10 UTC
    You'd have to read the referenced node and attempt to understand it to get the point of course...

      What's humorous to me is that Ronnie actually participated in that thread back in 2004...



      --chargrill
      $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}