Main Page | Report this Page
Linux Forum Index  »  Linux - Red Hat Forum  »  Search query...
Page 1 of 1    

Search query...

Author Message
Kevin...
Posted: Mon Aug 31, 2009 5:16 pm
Guest
Ok, I can do this via Perl using the match operator, but just
wondering how to do it at the command line without using Perl.
Anything else, sed, egrep, awk will do. I have tried a few options,
but all of them print out the entire line.

Anyway, here it is -

1. I want to take the output of a ps command and search for say
some_process

ps -ef | grep some_process

2. The output of that would be say

1280 128 root /opt/apps/programs/some_program/some_process
some_other_args

3. Now, when I run the regular expression I want it to display

some_program some_process

jk
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Mar 21, 2010 8:25 am