In most cases, this should do the trick (Linux Bash):
1. In Linux, you might want to get rid of the "-" in "ps -u" and just use "ps u" or you will get a warning message.
2. Count how many lines are presented before the actual list of processes produced by ps -u. Normally its 1, but could be 2 or more.
2. This example assumes 2 lines of text before the actual process data: