service nscd status #### #!/usr/bin/perl -w @args = ("/sbin/service", "nscd", "status"); while (system(@args) == 0) { print "job still running!\n"; sleep 2; }