Help with Automated Shell Script

Hello, how can I write a shell script that looks in running processes and if there isn't a process name containing 91.34.124.35 then execute a file in a certain place.

I know PHP, in PHP I could do a preg_match_all but I don't know how to do it in shell.

ps -ef | grep "91\.34\.124\.35" | grep -v grep > /dev/null
if [  "$?" -ne "0" ]
then
 #execute the command here
else
 echo "Process is running fine"
fi

Shell Tutorial -- Bourne Shell Tutorial

#!/bin/bash
if [ `ps -ef | grep "91.34.124.35" | grep -v grep | wc -l` -eq 0 ]; then sh scriptname; fi
#!/bin/bash
if [ `ps -ef | grep "91.34.124.35" | grep -v grep | wc -l` -eq 0 ]; then sh home/asfd.sh; fi

or

ps -ef | grep "91\.34\.124\.35" | grep -v grep > /dev/null
if [  "$?" -ne "0" ]
then
sh home/asfd.sh
else
echo "Process is running fine"
fi

Is this OK, I mean can I execute a script at an another dir.

Also how can i make this run every 30 seconds in a continuous loop, I think there was a sleep command.

ps -ef | grep "[9]1.34.124.35"  || /yourscript.sh

So have can I add the automation?