I have two simple questions regarding the use of the grep command.
What I want to do is:
- show the total lines (processes) running as me except for the command(s) that we used to create the listing.
- Next, I want to modify a listing of total lines running as me and only parse out the userID and the PID into a new list.
For the first one, I thought something along the lines of
ps -ef | grep myusername | grep -v "somecommand" | wc -l)
would suffice but I'm not sure what to type in for someprocess to edit out the command used to generate the list.
For the second question, I'm not sure how to approach it.