Hi all I'm trying to find a one line command that would show me all columns of the ps -ef command for all the processes started by our id that weren't started today, so where column 5 is non-numeric. I get the results I need by running three commands but was wondering if there is a way to print these with a one-line command.
First command ( prints all processes started by testid and sorts by the time column and stores in test1.txt)
ps -ef | grep testid | sort -k5 > test1.txt
Second command ( prints the 5th column only for all processes started by testid and sorts by the time column and stores in test2.txt)
ps -ef | grep testid | sort -k5 | awk '{print $5}' | grep -v [0123456789] > test2.txt
Third command ( grep test1.txt for the lines in test2.txt)
grep -f test2.txt test1.txt
I'm thinking there is a way to do this all in one command but can't figure it out