prstat problem

This will be a smaple output for my prstat -t
NPROC USERNAME SIZE RSS MEMORY TIME CPU
43 root 249M 62M 1.5% 33:50:01 0.1%
12 oadmin 1396M 862M 22% 0:06:49 0.1%
2 acne 3960K 3176K 0.1% 0:00:00 0.0%
4 essagent 10M 7456K 0.2% 0:00:00 0.0%
1 smmsp 4424K 568K 0.0% 0:00:00 0.0%
1 daemon 2544K 1128K 0.0% 0:00:00 0.0%

I want to get the output of only user 'oadmin' so I tried to use

prstat -t | grep oadmin , when i used grep this doesnt seem to work any ideas please.
:confused:

prstat -t -u oadmin doesnot give the output , imean the script never returns.essentially i just want to get the memory variable for user oadmin which is 22 , any ideas how to get this.

This should work:

prstat -t|grep oadmin|cut -d" " -f5

Regards

try:

prstat -t 1 1 | gawk '/oadmin/{print $3;}'

prstat -t>a ; more a|grep smmp

press ctl+c

you get your output

This worked for me:

prstat -t 1 1 | awk '/oadmin/{print $5;}'

Thanks guys ..all the solutions were helpful and I was able to use the stmt from Kevin into my program.