Shell Script for PIDs

I am trying to write a Shell script wherein the shell needs to read a list of PID in the File $stat/bin/Process and compare it to the PID of the processes running on a server.

Also the script should return KO(not OK) with corresponding label :-

a) When an environmental variable not defined.

b) There is no running process.

c) There is less running PID than registered PID.

d) There is more running PID than registered PID.

Any inputs please.

Thanks a lot in advance.

Marconi,

It's against the forum rules to post homework here.

Regards

Not to offend you, if so am very sorry

Could you elaborate on part a) of the question ?

What is that you had tried so far, post us your script and we should be able to definitely help you !