Click to See Complete Forum and Search --> : Really Confused, Need Help soon!
Web Wench
03-24-2003, 02:37 PM
I have a few shell (.ksh) scripts on my unix server that I need to be able to start via a web page. And I am hoping that someone here will be able to show me an example of a
script that will do this?
I am ok with html and the shell script, but when it comes to
the cgi/perl, I am totally lost!!
Thanks in advance!!
jeffmott
03-24-2003, 11:30 PM
You should be able to make the shell script itself executable, but if for some reason you can't because of a server configuration or whatever and are going to execute it via a Perl script then you'll probably want to use system (http://www.perldoc.com/perl5.8.0/pod/func/system.html).
Web Wench
03-25-2003, 05:17 PM
Thanks for getting me pointed ( I think) in the right direction...
As I understand it - System() waits for a return from the program. The program (shell script) I need t kick off simply passes an application command to the app from the command line. So there is no return.
SO instead, I tried the following - works great on the command line still clueless on how to make a hyperlink/button start it though?
#!/user/bin/perl
$updnow = ("/usr/scripts/jans/updnow.ksh")
exec $updnow;
jeffmott
03-25-2003, 08:05 PM
still clueless on how to make a hyperlink/button start it thoughJust have the link reference the Perl script.