ps avg | grep ? filter the desired out put.

Hi Folk,

Following is the command I used to get data related to the DataFlowEngine.
I wanted to know the % usage of cpu and memory.

ps avg | grep Data

This command will show the processes with its PID as :

PID   TTY  STAT  TIME   PGIN SIZE  RSS    LIM  TSIZ   TRS %CPU %MEM COMMAND 
  303248   - A    306:32  378 96628 77420    xx    20    56    0.0  0.0           DataFlo
  315404   - A     7:52   109 77944 51104     xx    20    56    0.0  0.0         DataFlo
  426060    - A    230:41  16 100196 100252  xx    20    56   0.1  0.0          DataFlo

Now I want the further details related to that PID that I can get after searching in ps -elf table.

How to use the output of above given command (ps avg | grep Data) as input to the ps -elf and then filter the PID and Process Name using one line command?
If script then it would be ok as well.
I know we can use awk or sed command to filter that.

for DATAPID in `ps -avg | grep Data | awk '{ print $1 }'`; do
 ps -elf | grep ${DATAPID} | grep -v grep
done

Not an elegant one-liner but it might provide what you are after.