A minor point, but the test for the PBS resource manager gives a false positive in an SGE installation as it just looks for qstat on the path. That's also an SGE command (maybe actually defined by the POSIX batch system standard?). If it helps to disambiguate them, the SGE version invoked as `qstat -help' produces output whose first line starts with `GE '.