This is part of a menu driven script I am trying to wrap up and im stuck.
I am using pgrep to get all the processes associated to a user, that works. Now I need to dump those into an array so I can kill all at the same time rather than one by one. I included a global variable called
my @processes = 'ls -l';
But I know there is more.
case 5 {print "Please enter the username for all associated processes \n" ;
chomp ($user_input = <>) ;
system("pgrep -l $user_input");
0 Replies - 3273 Views - Last Post: 24 December 2012 - 05:54 PM
#1
Cant figure out how to dump processes into an array after pgrep
Posted 24 December 2012 - 05:54 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote


|