Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Parsing 'ps' output

by themage (Friar)
on Dec 28, 2006 at 11:26 UTC ( #592017=note: print w/ replies, xml ) Need Help??


in reply to Parsing 'ps' output

Hi vineet2004,

You would not be here asking us it it was correct, would you? I think your only mistake is in this line:

if(/^([\d]+)*(hullBts_static)/)
You are missing the dot (.) before the asterisk. It should be:
if(/^([\d]+).*(hullBts_static)/)
I don't see any other problem, and it should do what you want... I guess.


Comment on Re: Parsing 'ps' output
Select or Download Code
Re^2: Parsing 'ps' output
by vineet2004 on Dec 28, 2006 at 11:43 UTC
    hey monks...thanks for the help i have one more prob.....how do i accept this STDOUT $var into the shell script.....i know its not related to perl probably.....but i think u giys would know my code goes like this.....actually this isnt mine...a monk wrote it for me
    perl -ne 'while (my $var= <STDIN>) { $run = "awk -f work _5messages.awk ".$var; `$run`; }'
    the error is :
    awk: fatal: can't open source file `work' for reading (No such file or + directory

      Oh, you mean in "Re: shell prob?" Yeah, you have an extra space there. You didn't type what he typed...

      -Paul

      there should not be any spaces after 'work' in the code ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://592017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2015-07-02 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls