I am checking processes by "p" command and output is like below.
UID PID PPID C STIME TTY TIME CMD
myapp 10235 20365 99 Feb15 ? 11-15:01:41 cont AppRating
myapp 20168 20365 99 01:39 ? 18:29:08 cont AppRating
myapp 20322 1 0 2017 ? 18:07:14 monitor -p -a
myapp 20355 20322 0 2017 ? 12:34:55 agent -n
myapp 20780 20322 10 2017 ? 12-02:36:07 bsus -n
myapp 40675 20365 99 Feb16 ? 10-10:34:21 cont AppRating
myapp 60749 20365 99 Feb21 ? 1-22:12:18 cont AppRating
myapp 143363 20365 4 Feb26 ? 08:04:12 cont TimeOutSession
myapp 143569 20365 1 Jan31 ? 05:57:05 cont AMn
myapp 242818 20365 99 Feb21 ? 1-00:00:38 cont AppRating
Now i want to check the processes whose STIME is after day before yesterday.
suppose if today date is 27th feb 2018. then i want to check whether any process started after 26th feb 2018 00:00 AM.
if yes then print not ok infront of that line. like below output.
myapp 20168 20365 99 01:39 ? 18:29:08 cont AppRating --> NOTOK
myapp 143363 20365 4 Feb26 ? 08:04:12 cont TimeOutSession --> NOTOK
Otherwise print simply "OK" only.