linux - Finding an exact match in QNX without using grep -w -


i'm writing script needs find exact match in file compatible qnx , posix compliant linux

more detail:

im trying find user of process original command wrote

user=$(ps -aux | awk '{print $1 " " $2}' | grep -w ${process} | awk '{}print $1') 

which works in posix compliant linux

however, qnx isn't totally posix compliant , grep -w isn't usable target...so need find exact match without grep -w

i think want print field 1 if field 2 matches something:

ps -aux | awk -v p=$process '$2==p{print $1}' 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -