This isn't an actual problem - but more of a curious question, when I run while true; do ps aux | grep abc; echo done; done
I get the following:
user 29733 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29735 0.0 0.0 11748 920 pts/1 S+ 20:25 0:00 grep --color=auto abc
done
user 29737 0.0 0.0 11748 924 pts/1 S+ 20:25 0:00 grep --color=auto abc
done
done
done
done
user 29745 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29747 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29749 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29751 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29753 0.0 0.0 11748 924 pts/1 S+ 20:25 0:00 grep --color=auto abc
done
user 29755 0.0 0.0 11748 924 pts/1 S+ 20:25 0:00 grep --color=auto abc
done
done
user 29759 0.0 0.0 11748 924 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
user 29761 0.0 0.0 11748 920 pts/1 R+ 20:25 0:00 grep --color=auto abc
done
Sometimes grep
doesn't actually see itself in ps aux
. Is this just a timing issue between the two processes running? This also happens when I run the commands individually and not in a loop.
This is happening both on my computer and another machine over ssh, but it is happening more frequently on the remote computer (which the output is from).
Ubuntu 14.04