20 lines
		
	
	
		
			694 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			694 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
############################################################
 | 
						|
# Script to get jobname for each crashed job               #
 | 
						|
# If jobname contains event number => get crashed events   #
 | 
						|
#                                                          #
 | 
						|
# argument $1 - list of failed hydro jobs                  #
 | 
						|
# you can get that by running 'bash makelist.sh'           #
 | 
						|
############################################################
 | 
						|
 | 
						|
if [[ -f "crashed_jobs.txt" ]]; then		## delete previous list
 | 
						|
	rm crashed_jobs.txt
 | 
						|
fi
 | 
						|
 | 
						|
for item in `cat $1`				## loop over crashed job IDs
 | 
						|
do 
 | 
						|
    #echo $item
 | 
						|
    sacct -j $item --format=Jobname >> crashed_jobs.txt		## gets a jobname for each job
 | 
						|
done
 | 
						|
 |