|
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 |
|
|