D
DeveloperGuy
I am very very new to Perl and am trying automate a process in my AIX
Unix box. I issed the command ps -aef and sent it to a file. How do
I get how many different users running programs, the total time for
each user in hours:minutes format, and who is running the longest
process and the program name? I am not familiar with using the loops.
I know that I can probably use the date command to specify the date.
This is where I am stuck thus far. Please help anyone...
#! /usr/bin/perl
use strict;
use warnings;
@users;
@tmpfile = OPEN(DataFileHandle, /home/smallp/data.txt);
$tmpfile[0];
$users[0];
for ($count= 0; $count <= $#users; $count++ {
If $tmpline[0] eq $users
if TRUE then exit
push(@users, $users[0]);
}
Unix box. I issed the command ps -aef and sent it to a file. How do
I get how many different users running programs, the total time for
each user in hours:minutes format, and who is running the longest
process and the program name? I am not familiar with using the loops.
I know that I can probably use the date command to specify the date.
This is where I am stuck thus far. Please help anyone...
#! /usr/bin/perl
use strict;
use warnings;
@users;
@tmpfile = OPEN(DataFileHandle, /home/smallp/data.txt);
$tmpfile[0];
$users[0];
for ($count= 0; $count <= $#users; $count++ {
If $tmpline[0] eq $users
if TRUE then exit
push(@users, $users[0]);
}