Re: UNIX commands in PERL
by "Kevin Haidl" <kevinh(at)actofmind.com>
|
Date: |
Tue, 14 Mar 2000 13:34:23 -0800 |
To: |
"Grant Peel" <tracker(at)home.com>, "HWG - Languages" <hwg-languages(at)hwg.org> |
References: |
home |
|
todo: View
Thread,
Original
|
|
When I type "ps x -u" from the command line, ps gives me:
ERROR: List of users must follow -p
I think to make x and -u work together you have to supply a username for -u.
I don't exec shell stuff too often, but I think this might work:
#!/usr/bin/perl5
print "Content-type: text/html\n\n";
print "Current Server Processes:\n\n";
print " \n\n";
$user = $ENV{'USER'};
print `ps x -u $user`;
Kevin Haidl
Act of Mind Communications
Web Assessment, Site Design, Site Production and Site Promotion
kevinh(at)actofmind.com http://www.actofmind.com (604) 734-5098
----- Original Message -----
From: "Grant Peel" <tracker(at)home.com>
To: "HWG - Languages" <hwg-languages(at)hwg.org>
Sent: March 14, 2000 11:25 AM
Subject: UNIX commands in PERL
> Thaqnks for you help guys!
>
> but...
>
> Still not working.
>
> Here is the script (with the back tildy things..)
>
> ****
> #!/usr/bin/perl5
>
> print "Content-type: text/html\n\n";
> print "Current Server Processes:\n\n";
> print " \n\n";
> print `ps x -u`;
> ****
>
> Here is the browser output:
>
> ****
> <html>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> </head>
>
> <body>
>
> Current Server Processes:
>
>
>
>
>
> </body>
>
> </html>
> ****
>
> -Grant
>
>
> Grant W. Peel
> The Net Now Internet Services - info(at)thenetnow.com
> Member:
> HTML Writers Guild
> International Webmasters Association
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA