Hey,
So I'm new to shell scripting, and I'm trying to write one for my lab that will keep down the work load by deleting processes that are left over from previous sessions.
Basically I want it to do three things.
1) Check the processes running
2) See if that person is logged on.
3) if not, delete the process.
I've got a pretty good idea about how to do all that, but I need it to ignore all of the root and system processes that run all the time. All of those have a PID under 200 so how do I say
"For processes with PID over 200" or possibly "Show only processes with PID over 200"? I could also do between 200-10000.
I tried 'seq 200 10000', but I think it's too big of a range, and it won't work.
then the next step I'm using is
ps auxw |cut -f1 -d\ |sort -u > $OUTPUTLOC/ScriptDraft.proc$$
(where OUTPUTLOC = /tmp)
Any help is greatly appreciated.