ps aux | grep returns pid for itself too ps aux | grep returns pid for itself too bash bash

ps aux | grep returns pid for itself too


In this particular case, escaping the . to what I assume it was meant to do should work:

ps aux | grep '7000\.conf' | awk '{print $2}'

Alternatively, exclude grep:

ps aux | grep 7000.conf | grep -v grep | awk '{print $2}'


ps aux | grep "[7]000.conf" will work as well.