On Sat, Jul 08, 2006 at 01:09:48AM -0300, Diego Alencar Alves de Lima wrote: > How can I make a script that will check to see if a certain process is > running? The process name is "nspluginviewer" and there should be 3 of it > running (each one called from a konqueror process). Then it would reboot the > computer if it didn't detect the three running. > There are many ways to do it, one could be: while [ $(pidof <command> | awk '{print NF;}') -eq <nr occurences> ]; do sleep 1; done ; shutdown -r now Regards, Frederik - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs