<b> Write a Shell script to check process is running or not in Linux</b> #!/bin/bash pid=`pgrep -f apache2` pid_count=${#pid[@]} if [  $pid_count -gt "1" ];then   echo "Apache pid not found"       exit 1 else     echo "Starting service"      service apache2 start fi