"ps aux" outputs the following as the first line: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
how can I preserve this line if I do a "ps aux | grep " so that I can still see the header for each column?
In essence, I want to grep all but the first line of the initial "ps aux" output.
ok, I answered my own question. haha
ps aux | egrep '|USER'
I had to use egrep and single quote the string with the OR (|)
ps supports and option "h" (not -h) that suppresses the header from getting printed. See "OUTPUT FORMAT CONTROL" section in "man ps".