I have two different shell script say like 

```
a.sh 
b.sh

**code of a.sh**

#!/system/bin/sh
#some code
./xyz/b.sh &

```

Here we can see i am running `b.sh` through `a.sh file` which is postboot script. Each time when device gets reboot it is adding `./xyz/b.sh` & which i am trying to avoid.

```
what i am trying to do : 
i need to write a code in such a way that will find if ./system/xyz/b.sh & is already there then no need to add again.

Code : 
if  pgrep /xyz/b.sh > /dev/null 2>&1
then
echo aplog is running
exit 1
fi

```

these code is not running. Do not know where i am doing mistake.