transfer value to variable from awk for monitoring process

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

transfer value to variable from awk for monitoring process

Dontknowunix
guys please i need help with an issue. I have the below script to monitor a process ABC but i always get process not running as echo.... it seems the variable value is not transferred... plz help


#!/bin/ksh
esbpid=""
esbpid= `ps -fu aircrews | grep -v grep | grep -i ABC | awk '{print $2}'`
if [ "$esbpid"="" ]
then
echo "process not running"
else
echo service is ok
pid=""
fi
Reply | Threaded
Open this post in threaded view
|

Re: transfer value to variable from awk for monitoring process

Guru
Administrator
esbpid= `ps -fu

No space before or after =