linux bash script to view new processes code example
Example: bash check if process is running by name
if pgrep -x "<PROCESS_NAME>" > /dev/null; then
echo "Running"
else
echo "Not running"
fi
if pgrep -x "<PROCESS_NAME>" > /dev/null; then
echo "Running"
else
echo "Not running"
fi