Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/perl
#from this post: http://www.linuxquestions.org/questions/programming-9/script-to-see-if-a-process-ir-running-if-not-start-it-339618/
open PROS, "ps -ef|grep process |";
while ($line = <PROS>){
unless ($line =~ m/grep/){
exit;
}
}
exec 'nohup /path/to/my/script/./script &';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment