title: Bash script to check multiple running processes
body: <p>I'm made the following code to determine if a process is running: </p>
  
  <pre><code>#!/bin/bash
  ps cax | grep 'Nginx' &gt; /dev/null
  if [ $? -eq 0 ]; then
    echo "Process is running."
  else
    echo "Process is not running."
  fi
  </code></pre>
  
  <p>I would like to use my code to check multiple processes and use a list as input (see below), but getting stuck in the foreach loop.</p>
  
  <pre><code>CHECK_PROCESS=nginx, mysql, etc
  </code></pre>
  
  <p>What is the correct way to use a foreach loop to check multiple processes? </p>