Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open new Unix console session from perl script

Status
Not open for further replies.

1yura1

Programmer
Feb 7, 2003
36
0
0
UA
Hello,

I need to start/open new console session from my perl script, and allow user to run any commands (like as in usual Linux console).

Thanks,
Yura.
 
Hello Yura,

You running X-Windows?

Mike

"Deliver me from that bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
<Mike> Hi, no I'm running Linux. I konow that it has to be very simple.
 
Just start a shell with the system command then, like this:

system('sh');

If you wish you can set the prompt the shell will use by setting the PS1 environment variable before the system() command, like this.

$ENV{'PS'} = "UNIX Shell. Type 'exit' when finished. >";

Mike

"Deliver me from that bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top