I am trying to check if a process (assume it is called some_process) is running on a server. If it is, then echo 1, otherwise echo 0.
some_process
This is the command th
pgrep -q some_process && echo 1 || echo 0
more oneliners here