Hi!
I desperately need some help here... I need to write a shellscript that lists all running processes (as in ps -ef), search the list it gets for occurances of a certain process, if found do nothing if not found start it again. Anyone feel up to it?
/G
Try something like:
#!/bin/ksh ps -ef | grep [f]oo if [ $? -eq 1 ] then echo Process not running. # Restart process here fi
Replace 'foo' with whatever your process name is. The [ ] brackets around the first letter will stop grep from matching on itself.
HTH