Re: UNIX commands inside perl script.
by "Grant Peel" <tracker(at)home.com>
|
Date: |
Tue, 14 Mar 2000 13:11:46 -0500 |
To: |
"Doran L. Barton" <fozz(at)xmission.com> |
Cc: |
"HWG - Languages" <hwg-languages(at)hwg.org> |
References: |
home xmission |
|
todo: View
Thread,
Original
|
|
That didn't work. Just shows the words in the browser window.
Thanks anyway!
-Grant
----- Original Message -----
From: "Doran L. Barton" <fozz(at)xmission.com>
To: "Grant Peel" <tracker(at)home.com>
Cc: "HWG - Languages" <hwg-languages(at)hwg.org>
Sent: Tuesday, March 14, 2000 12:11
Subject: Re: UNIX commands inside perl script.
> Not long ago, Grant Peel proclaimed...
> > A quick queston for anyone who knows perl well.
> >
> > How do I call a system (UNIX BSDI) command from inside a perl script and
> > have it display back in the browser?
> >
> > Example..inside an html page, shtml actually, i have an SSL command:
> >
> > <!--#EXEC CGI="/cgi-bin/command.cgi"-->
> >
> > then, in the command.cgi, i have something like:
> >
> > #!/usr/bin/perl5
> >
> > print "Content-type: text/html\n\n";
> > print "Current Server Processes:\n\n";
> > print | exec('ps x -u');
> >
> >
> > The idea is t be able to show the current server processes from a web
page.
> >
> > Any Ideas?
>
> print `ps x -u`;
>
> -=Fozz
>
> --
> Doran L. Barton = fozz(at)xmission.com && http://www.xmission.com/~fozz/
> ** Dynamic web developer, Perl hacker. Using the Internet since 1990. **
> "That year, 2000, will be the biggest hole in the status quo since 1977
and
> 1989." -- Bruce Sterling, Oct 1998, SF, CA (I was there when he said
it!)
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA