I have simple unix shell script as follows. Which is giving different count for a service
#!/bin/bash service=$1 ps -ef | grep $service | grep -v "grep&