ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Friis/Utilities/waitForBJob.sh
Revision: 1.1
Committed: Tue Jul 19 12:36:34 2011 UTC (13 years, 9 months ago) by friis
Content type: application/x-sh
Branch: MAIN
CVS Tags: HEAD
Log Message:
Add tool to wait for lxbatch job to complete

File Contents

# User Rev Content
1 friis 1.1 #!/bin/bash
2    
3     echo "Waiting for LXBJob named $1 to finish."
4    
5     counter=0
6    
7    
8    
9     while [ `bjobs -J $1 | grep -e "^[0-9]" | wc -l` -gt 0 ]
10     do
11     counter=$(( $counter + 1 ))
12     echo "<$1>: have waited $counter minutes"
13     sleep 60
14     done
15    
16     echo "LXBJob $1 finished after $counter minutes"