Skip to content

Instantly share code, notes, and snippets.

@danmackinlay
Created November 3, 2011 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danmackinlay/1335824 to your computer and use it in GitHub Desktop.
Save danmackinlay/1335824 to your computer and use it in GitHub Desktop.
Submit jobs with arguments to openPBS
#!/bin/sh
# Because OpenPBS is fucked, it cannot pass arguments to scripts, but only set environment variables.
# So we build this sophisticated functionality for ourselves, using a tottering monolith of subtle and
# hairy code that shows how functionality such as this might be accomplished despite
# the fierce difficulty, and yet how it is clearly such a shambolic affair that it can not possibly have seemed
# reasonable to provide as a service to users
#
# Usage:
# qsub run_script_with_args.sh -v 'PBS_COMMAND=ls -l'
exec $PBS_COMMAND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment