Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

new shell - perl

by opensourcer (Monk)
on May 07, 2008 at 10:44 UTC ( #685185=perlquestion: print w/ replies, xml ) Need Help??
opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
How do i open a new shell from perl script and continue to execute rest of statements without exiting the new shell.
update:
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. Thanks

Comment on new shell - perl
Re: new shell - perl
by jettero (Monsignor) on May 07, 2008 at 10:51 UTC
    exec bash => '-i' unless fork;

    I don't think it's going to work quite how you want. It depends on what you're up to. If you detailed the actual problem you're trying to solve, there'd be a flood of useful answers.

    -Paul

      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.
        That looks like a very different question ;-)

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-12-26 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (167 votes), past polls