Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

new shell - perl

by opensourcer (Monk)
on May 07, 2008 at 10:44 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found