CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
"SYSTEM" function

 



terraform
Deleted

Jun 16, 2000, 1:28 PM

Post #1 of 3 (2222 views)
"SYSTEM" function Can't Post

I am executing a command on the system, but I am being prompted if I want to continue y/n.

My questions is --> How can I code the "Y" so I can just let the program run?


Thanks in advance
Stu


Kanji
User

Jun 16, 2000, 6:55 PM

Post #2 of 3 (2222 views)
Re: "SYSTEM" function [In reply to] Can't Post

You don't say what command, but you should check to see if it has a batch mode, and run it in with whatever args are required to make it run as such.

On some systems, you could also pipe a Y into the command before hand ( system("echo y | command").

And, finally, you can use a comibination of pipe and exec to read from/write to an external command.

IIRC, IPC::Open2 and IPC::Open3 try to simplify the last, but can still deadlock (ie, both you and the command trying waiting for the other to say something).


terraform
Deleted

Jun 19, 2000, 6:16 AM

Post #3 of 3 (2222 views)
Re: "SYSTEM" function [In reply to] Can't Post

Thank you Kanji,

The system("echo Y | command") worked

Sorry, I did not provide the software, but I do not think to many people are using
SDE. I will keep it mind for the next time.

Thanks again

Stu


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives