I need to run a different script depending on the type of scheduler, which necessitates a reliable way to detect if the scheduler is Torque, SGE or something else. Something like $SHELL telling which shell I am using. or something like name.
I am aware of environmental variables the two systems set, but they don't offer me a reliable or an elegant way - given the commands the env. variables are named similarly or identically.. there needs to several ifs and buts before we can conclude which is it.