[GE users] JOB_ID

Olesen, Mark Mark.Olesen at emcontechnologies.com
Wed Sep 26 08:11:20 BST 2007

    [ The following text is in the "X-UNKNOWN" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

>  Another short question - I need to get job id after qsub. I can of cause
parse output but is the any exit
> code and/or environment's variables?

In new versions you can thankfully just use the '-terse' option:

    jobId=$(qsub -terse ...)

In older versions you need to grab the job Id from the output and parse it:

    jobId=$($SGE_BINARY_PATH/qsub ... | awk '{print $3}')

Of course, you then get the return code from awk and not from qsub.
You thus really need 

    info=$($SGE_BINARY_PATH/qsub ... 2>&1)
    jobId=$(echo $info | awk '{print $3}')

The new '-terse' option is certainly makes it a bit more convenient.
This e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of EMCON Technologies, its affiliates, or third parties. This notice serves as marking of its ?Confidential? status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list