#!/bin/bash for $PROC in daemon1 daemon2 daemon3 ...; do PID=$(ps aux | grep $PROC | awk '{print $2}') if [ $PID = '' ]; then $PROC &&; fi done