Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: new shell - perl

by opensourcer (Monk)
on May 07, 2008 at 10:58 UTC ( #685187=note: print w/ replies, xml ) Need Help??


in reply to Re: new shell - perl
in thread new shell - perl

some 1 has written a script(say GCC.pl) which sets up few setenv's and creates a new shell and exists the scripts. now the setenv's are accessible, the another script access those setenv's to run. I want to automate it, so that i don't have to run the first script and then the second i want to add both of them in one.


Comment on Re^2: new shell - perl
Replies are listed 'Best First'.
Re^3: new shell - perl
by moritz (Cardinal) on May 07, 2008 at 11:02 UTC
    That looks like a very different question ;-)

    You can just exec 'script2'; At the end of the first script.

      i did tried that but after executing the statement which creates a new shell, the script exits and i get a prompt.
        You don't have to create a new shell in the script that changes the environment:
        # File foo.pl: $ENV{FOO} = 'bar'; exec 'perl', 'bar.pl'; # File bar.pl: print $ENV{FOO}, $/; # launch it: $ perl foo.pl bar

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://685187]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2015-07-31 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls