Created
August 2, 2018 07:23
-
-
Save clungzta/a670f987428302a7043e1101301e7139 to your computer and use it in GitHub Desktop.
Run's a PBS job using qsub, displays output as the program runs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # usage ./qsub_with_output.sh cnn_match.sh | |
| # where cnn_match.sh is a qsub script | |
| jobID=$(qsub $1) | |
| jobIDNumeric=${jobID//[!0-9]/} | |
| echo $jobIDNumeric | |
| qstat -s -u am893 | |
| sleep 5 | |
| less $1'.o'$jobIDNumeric | |
| less $1'.e'$jobIDNumeric | |
| while qstat $jobID &>/dev/null | |
| do | |
| qstat -s -u am893 | |
| sleep 1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment