I am using ps to list all of the processes running on the machine I am connected to, searching them for my own processes, and then printing the number of processes I am running, like so:
ps -Af | grep '^mkuhlman' | wc -l
Problem is, checking against the actual list of processes, I'm only running 8, but wc
is listing 9 processes. What am I doing wrong?
To clarify, I am not looking for matches to processes, but matches to my own username.