I would use and : ps awk
% ps aux | awk -v PID=13521 '$2 == PID { print $1 }'
root
... where 13521is the PID in question. Replace your own PID or ${environment_variable}to your liking!
If you do not have a PID, you can find all users running Google Chrome (for example):
% ps aux | awk -v app='Google Chrome' '$0 ~ app { print $1 }'
source
share