Search code examples
cluster-computingsungridengine

Sun Grid Engine - Submitting job from command line


I'd like to submit a job to the Sun Grid Engine using a single command line argument, rather than using a shell script. Can it be done?

Example:

I want to do this, and submit to the batch queue:

mkdir empty_directory && cd "empty_directory" && touch "empty_file.txt"

Rather than doing this: dir_script.sh:

#!/bin/bash
mkdir empty_directory
cd empty_directory
touch empty_file.txt

Then:

qsub dir_script.sh

Solution

  • I do this all the time, using pipe (|):

    echo "mkdir empty_directory && cd empty_directory && touch empty_file.txt" | qsub [options]