0

I have a MonoDevelop application built in Red Hat Linux. The below command will start the mono application similar to a windows service

mono myMonoApp.exe

I need to check in my bash script if the above process is running or not?

For example, I will use the below command to check it for my C++ application that will return the PID of the process if it started already.

/usr/bin/pgrep -fx /usr/home/myapplication

I tried the pgrep command for the mono application, but its not working

/usr/bin/pgrep -fx /usr/home/myMonoApp.exe

The ps -ef | grep myMonoApp command returns the following:

usr11  5380  4845  2 11:52 pts/2    00:00:00 mono myMonoApp.exe

Thanks for your help

Ullan
  • 1,311
  • 8
  • 21
  • 34

0 Answers0